mirror of
https://github.com/Chevron7Locked/kima-hub.git
synced 2026-06-19 07:37:17 +00:00
56881120b7
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.