Repository navigation
feat(online): Keep the WebSocket sending under backpressure and pick a working service route - #645
Open
tintinhamans wants to merge 17 commits into
Conversation
tintinhamans
force-pushed
the
arctic/go/feat/service-endpoint-selection
branch
2 times, most recently
from
October 24, 2026 20:42
e1f4a9c to
5b878e7
Compare
tintinhamans
force-pushed
the
arctic/go/feat/service-endpoint-selection
branch
4 times, most recently
from
October 25, 2026 11:15
350a36a to
20e5385
Compare
…m::openArchiveFile() (TheSuperHackers#3376)
…leSystem, Win32LocalFileSystem (TheSuperHackers#3374)
…ile::getFileInfo(), StdBIGFile::getFileInfo() (TheSuperHackers#3415)
…ystem into BIGFileSystem (TheSuperHackers#3505)
…e loadBigFilesFromDirectory (TheSuperHackers#3505)
…riting archive first
…only with verbose logging
tintinhamans
force-pushed
the
arctic/go/feat/service-endpoint-selection
branch
from
October 28, 2026 01:47
20e5385 to
680cbf6
Compare
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 #648. Includes #644, closed as folded into this PR.
WebSocket::Ticksent the whole outbound queue and only logged failures, so a partial send orCURLE_AGAINlost the rest of a frame and the next message went out in the middle of it. The game also talked to a single API host, so a player whose route to it was blocked could not log in.The send queue now keeps the offset into a partly sent message and is capped, a tick reads up to 64 queued frames, heartbeats no longer pile up, and any send or receive error reconnects. The game tries
api.playgenerals.online, thenapi-ru.playgenerals.online, through the anonymousVersionManifestrequest (6 s each) and remembers the one that worked. A 401 or 403 stops the search, the route is reused for 30 s, a signed in session keeps its route, anddevandtesthave one route. Requests and the WSS address stay on the selected route, the token is only sent there, and redirects are no longer followed.settings.jsongetsnetwork.server.mode(automatic, the only value here, custom comes with #646) andnetwork.last_route, the host of the last working route. The olduse_alternative_endpointis read once as theapi-ruhost, andnetwork.http_versionis dropped. Invalid values are reset to their default and written back. Unknown keys are kept on save, butdata_packsis replaced wholesale by what the client holds, and a settings file that could not be read is no longer overwritten with defaults.Response bodies, login codes and websocket payloads are only logged with
debug.verbose_logging._DEBUGbuilds skip TLS verification for local service testing, release always verifies.No service changes needed. Tested:
z_generalsbuilds, route policy checks, a 120 s two client match with 25% TCP loss on the API/WSS port (no reconnect, no send error). Not tested: a real fallback to the alternative route.