Graceful WS reconnect with exponential back-off #52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
WebSocket connections can drop. During active games, recovery should be seamless.
Files to change
apps/web/src/lib/ws-client.ts— reconnection logic.apps/api/src/ws/handlers/lobbyHandlers.ts— handle rejoin.Client behavior
lobby:rejoin { lobbyId }.Server behavior
lobby:rejoin: validate player was in lobby, re-associate WebSocket, send current state.Acceptance criteria
Notes
Consider implementing basic reconnection first, defer game state recovery to follow-up.