mirror of
https://github.com/D-Modem/login.git
synced 2026-11-28 12:28:07 -08:00
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:
1 file changed
+8
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user