From 393dfef66115f11d8543cff80cd43f4f3e31d918 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Nov 2026 12:16:18 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01B82eRVGabTrMWBpbnD6HKF --- cmd/modemmenu/serve_many_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/modemmenu/serve_many_test.go b/cmd/modemmenu/serve_many_test.go index 776e766..02150ec 100644 --- a/cmd/modemmenu/serve_many_test.go +++ b/cmd/modemmenu/serve_many_test.go @@ -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()