Repository navigation
fix(online): Preserve WebSocket sends under backpressure - #644
Closed
tintinhamans wants to merge 12 commits into
Closed
tintinhamans wants to merge 12 commits into
tintinhamans wants to merge 12 commits into
Conversation
…e roster refreshes
… host or tearing down a match
tintinhamans
force-pushed
the
arctic/go/fix/websocket-resilience
branch
from
October 24, 2026 19:06
d524281 to
35edba8
Compare
Author
|
Folded into #645, which now carries its commit. |
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.
Merge after #625.
WebSocket::Ticksent the whole outbound queue every tick and only logged a failedcurl_ws_send. A partial send orCURLE_AGAINdropped the rest of that frame, so the next message went out in the middle of it, and a full queue discarded the oldest message even when it was the one half sent.FlushOutboundnow keeps the offset into the front message and sends the rest on the next call. The queue is capped at 256 messages and 2 MiB and rejects the newest message when full. A flush stops after 16 sends or 256 KiB so it cannot hold the game thread, andDisconnectonly sends CLOSE when nothing is half sent.CURLE_AGAINis treated as backpressure, any other send or receive error starts a reconnect, and liveness is only refreshed onCURLE_OK. The heartbeat is queued once, not again every interval while the socket is stalled. The timeouts are unchanged.