From a740376ea9ea82577a9121d428b0fc53ce435a01 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Thu, 28 May 2026 05:52:48 -0400 Subject: [PATCH] fix(serve): continue past transient accept errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously a single EMFILE / EINTR on listener.accept() returned from run_accept_loop entirely, killing the host's HTTP viewer fanout for the rest of the session. Most accept errors are transient — log and loop. Co-Authored-By: Claude Opus 4.7 --- src/host/serve.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/host/serve.rs b/src/host/serve.rs index 74ce058..38bfef3 100644 --- a/src/host/serve.rs +++ b/src/host/serve.rs @@ -130,8 +130,11 @@ async fn run_accept_loop(listener: TcpListener, tx: broadcast::Sender s, Err(e) => { - tracing::warn!("capture HTTP accept failed: {e}"); - return; + // Most accept errors are transient (EMFILE from a brief FD spike, + // EINTR, etc.). Bailing on the first one would kill the entire + // viewer fanout for the rest of the session. + tracing::warn!("capture HTTP accept failed (continuing): {e}"); + continue; } }; let rx = tx.subscribe();