Some checks failed
Deploy to Production / test (push) Failing after 33s
Disconnecting and reconnecting the WebSocket on every route change caused a race condition: the old socket's async onclose handler would null out globalWs after the new socket was created, causing JOIN_ROOM messages to be silently dropped. The WebSocket is a global singleton — keep it alive and let the built-in reconnection logic handle actual disconnects. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>