TestServeBusy: a dial refused while the line is still busy is retried

The server may hang up on a connection it is too busy for before the
test writes its header: a broken pipe, which is the busy answer, not a
failure.  The loop that waits for the line to be free tries again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVGabTrMWBpbnD6HKF
This commit is contained in:
Claude committed 2026-11-12 12:16:18 +00:00
1 parent 58ffd61645
commit 393dfef661
1 file changed
+8 -1
+8 -1
View File
@@ -366,7 +366,14 @@ command = echo info
for try := 0; try < 50; try++ {
l, err := dialLine(sock, "")
if err != nil {
t.Fatal(err)
// still busy: the server told it so and hung up before the
// header was written (broken pipe); try again
last = err
if l != nil {
l.conn.Close()
}
time.Sleep(100 * time.Millisecond)
continue
}
last = l.expect("login: ")
l.conn.Close()