You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4abafa4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(mobile): harden background resume and reconnection
Five targeted fixes for mobile clients returning from iOS suspension:
- Jitter the supervisor backoff ladder (equal jitter, [rung/2, rung]) so
clients sharing an environment stop reconnecting in lockstep.
- A failed foreground liveness probe now replaces the session immediately
instead of paying the first backoff delay for a failure the probe just
diagnosed.
- New advisory `network-path-changed` wakeup: WiFi<->cellular keeps
isConnected true while invalidating the socket's path, so the mobile
adapter now emits a wakeup on interface-type changes while active and
the supervisor probes the session instead of waiting ~5-10s for the
ping timeout.
- Report client activity on every newly connected session generation; the
AppState-triggered report races the reconnect and is dropped, which
left the server lease stale (provider/VCS work paused) for up to 25s
after a resume.
- Shell resumes a warm cache via afterSequence without the previously
unconditional HTTP snapshot fetch, mirroring the thread-detail guard;
foreground returns no longer pay an HTTP round trip.
Supporting changes: wire the patched RPC onPingTimeout hook to logging so
zombie-socket disconnects are distinguishable from ordinary closes, and
set the server websocket idleTimeout to 30s (Bun defaults to 120s) so a
suspended phone's half-dead socket and its server-side buffers are
released four times sooner; live clients ping every 5s and never idle.
Co-Authored-By: Claude Fable 5 <[email protected]>
0 commit comments