Repository navigation
feat(online): Keep the WebSocket sending under backpressure and pick a working service route - #645
Open
tintinhamans wants to merge 13 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
…m::openArchiveFile() (TheSuperHackers#3376) (cherry picked from commit 86f2cab)
(cherry picked from commit 5db4f75)
…leSystem, Win32LocalFileSystem (TheSuperHackers#3374) (cherry picked from commit 3f3ed9f)
…ile::getFileInfo(), StdBIGFile::getFileInfo() (TheSuperHackers#3415) (cherry picked from commit b805c12)
…File (TheSuperHackers#3505) Both classes are identical apart from their name and contain no platform specific code. Nothing in them depends on the BIG format either: they open a file from an offset and a size inside the archive file. ArchiveFile takes over their functions and is no longer an abstract class. (cherry picked from commit 52a777a)
…ystem into BIGFileSystem (TheSuperHackers#3505) Both classes are identical apart from their name and go through the local file system for all file access. The one class that remains sits next to ArchiveFileSystem in Core/GameEngine. (cherry picked from commit e4b4d1e)
…e loadBigFilesFromDirectory (TheSuperHackers#3505) loadMods refers to BIG files, which nothing else in ArchiveFileSystem does. It becomes a virtual function that BIGFileSystem implements. loadBigFilesFromDirectory is renamed to loadArchiveFilesFromDirectory, because the base class is not tied to one archive format. (cherry picked from commit f299561)
tintinhamans
force-pushed
the
arctic/go/feat/service-endpoint-selection
branch
3 times, most recently
from
October 25, 2026 05:20
733469a to
350a36a
Compare
…e Zero Hour archives (cherry picked from commit aaea4c1)
…only with verbose logging
tintinhamans
force-pushed
the
arctic/go/feat/service-endpoint-selection
branch
from
October 25, 2026 11:15
350a36a to
20e5385
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.