Repository navigation
fix(display-app): pin websocket-only transport (#2306) - #2316
Merged
Merged
Conversation
Release 1.26.0 — DEV → main (PROD promotion)
The default socket.io transport (polling→upgrade) starts with a long-polling handshake whose follow-up POST 400s behind the multi-instance CF approuter, leaving display-app stuck 'Reconnecting…'. Match the sibling clients (event-display, gameboard, app-space) which already pin transports:['websocket'].
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2306
Root cause
app/display-app/src/event-stream.tswas the only first-party socket.io client that did not settransports: ['websocket']. With the socket.io default (['polling','websocket']), the client opens with a long-polling handshake, then tries to upgrade. Behind the multi-instance CF approuter (#749 autoscaler, 1→4), the follow-up long-polling POST/socket.io/?...&sid=...returns 400 Bad Request, so the connection never establishes and the display-app is stuck on "Reconnecting…".The three sibling clients on the same
/ws/event-stream(and/display) namespace —event-display,gameboard,app-space— all already pintransports: ['websocket']and work.Fix
One line: pin
transports: ['websocket']in display-app'sio()call, matching the siblings. WebSocket upgrade is a single persistent connection, avoiding the stateful long-polling handshake entirely.Verification
npm run build(vite) passes clean./socket.io/POST).