perf(tcp): смерть smux-сессии без поллинга

This commit is contained in:
samosvalishe committed 2026-09-22 20:04:05 +03:00
1 parent b0e3cfe20a
commit 5b6ac18332
2 files changed
+12 -15

No files matched your search

+4
View File
@@ -191,9 +191,13 @@ func TestAwaitDeadOnClosedSession(t *testing.T) {
s := &session{smux: sess, permDead: make(chan struct{})}
_ = sess.Close()
start := time.Now()
if !awaitDead(context.Background(), logx.Nop(), s, 1) {
t.Error("awaitDead() = false on closed smux, want true")
}
if d := time.Since(start); d > 100*time.Millisecond {
t.Errorf("awaitDead() noticed close after %s, want immediately", d)
}
}
// Рецикл рвёт сессии, но состав пула не трогает: их переподнимает maintainSession.