Files
chevron7 56881120b7 fix(stream): don't kill paused streams -- reap dead peers via TCP keepalive instead
1.9.0 added server.timeout = 300s to reap dead mobile connections (B3). But
Node's socket timeout fires on INACTIVITY, and a paused audio stream is
inactive (no bytes flow while backpressured) -- so a pause longer than the
timeout had the server destroy the stream's connection, forcing a reconnect
on resume. On both web and iOS that surfaced as 'I pause, then have to focus
the app for it to play again' after a multi-minute pause; pre-1.9.0 had no
such timeout, so paused streams survived (the exact D1 risk the spec flagged).

Reap genuinely dead/half-open peers (mobile network gone without FIN/RST) via
TCP keepalive instead: server.timeout = 0, and each connection gets
setKeepAlive(true, 30s) so the OS drops a socket once probes fail while a
paused-but-alive stream keeps answering and stays connected.
2026-06-17 12:36:34 -05:00
..
2025-12-25 18:58:06 -06:00
2025-12-25 18:58:06 -06:00
2025-12-25 18:58:06 -06:00
2025-12-25 18:58:06 -06:00
2026-06-15 15:03:13 -05:00
2026-06-15 15:03:13 -05:00