From 5a793e1d424423bbebb485ffec42d8b289ccf455 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 15 Sep 2026 13:22:01 -0700 Subject: [PATCH] Clear the inherited non-blocking flag on accepted sockets in the CLI test server (#668) Co-authored-by: Claude Opus 5 --- crates-cli/yaak-cli/tests/common/http_server.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates-cli/yaak-cli/tests/common/http_server.rs b/crates-cli/yaak-cli/tests/common/http_server.rs index da797672..49a1e411 100644 --- a/crates-cli/yaak-cli/tests/common/http_server.rs +++ b/crates-cli/yaak-cli/tests/common/http_server.rs @@ -27,6 +27,10 @@ impl TestHttpServer { while !shutdown_signal.load(Ordering::Relaxed) { match listener.accept() { Ok((mut stream, _)) => { + // macOS and the BSDs hand back accepted sockets carrying the + // listener's non-blocking flag, which leaves the read timeout + // below with nothing to govern. + let _ = stream.set_nonblocking(false); let _ = stream.set_read_timeout(Some(Duration::from_secs(1))); let mut request = Vec::new(); let mut request_buf = [0u8; 4096];