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
fix: reconnect mobile relay after returning from background
On foreground, the app called relay.connect(), which bails when a socket
is still assigned (`guard task == nil`). iOS suspends the process in the
background, so the WebSocket can die without the receive/ping failure
callbacks ever firing to clear `task` and schedule a reconnect — leaving a
stale dead socket that made connect() a permanent no-op.
- Add RelayClient.reconnect(): tears down any existing socket, resets the
backoff counter, and reopens. SyncClient.start() now uses it (at launch
task is nil, so it behaves like a plain connect).
- Serialize background/foreground transitions in MobileAppState via a
lifecycleTask chain so a delayed stop() can't land after a later start()
and disable the relay for good.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments