fix(serve): continue past transient accept errors
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 <noreply@anthropic.com>
This commit is contained in:
+5
-2
@@ -130,8 +130,11 @@ async fn run_accept_loop(listener: TcpListener, tx: broadcast::Sender<Arc<Vec<u8
|
||||
let sock = match listener.accept().await {
|
||||
Ok((s, _)) => 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();
|
||||
|
||||
Reference in New Issue
Block a user