Skip to content

fix(online): Make P2P connections and the lobby flow reliable - #619

Draft
tintinhamans wants to merge 10 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/fix/mesh-cannot-connect-crash
Draft

tintinhamans wants to merge 10 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/fix/mesh-cannot-connect-crash

Conversation

@tintinhamans

@tintinhamans tintinhamans commented Sep 26, 2026 •

Copy link
Copy Markdown

Since switching to native ICE, more players got "cannot connect to all players". GNS now ships with both WebRTC and native ICE, selected by ice_implementation in the service config (default WebRTC, which worked before). The native client now pairs relay candidates found late and tries all STUN/TURN servers at once, so testers can be moved to it without a client release.

  • The cannot-connect handler no longer deletes the mesh during its own update, which crashed the game.
  • Only the later joiner of a failing pair gives up (2 attempts). A departed peer is dropped without leaving the lobby.
  • Native ICE also ranks network adapters, uses one stable IPv6 address per adapter, requests IPv6 relays, gathers again when the network changes, and fails over to a working backup pair when the active one goes quiet.
  • GNS starts once per login instead of every lobby. Mesh init failures fail cleanly. Anticheat connection-state updates are applied on the main thread.
  • Websocket messages and signals are queued instead of dropped, and flushed before disconnect. The host's connectivity check always resolves.
  • Lobby: no crash on Accept after the lobby is gone, stale create/join replies ignored, 64-bit lobby IDs kept, slots set by the server's slot index.
  • Quick match: callbacks ignored after the menu closes, failures decided by the matchmaker, setup timeout limited, quick match flag reset.

@tintinhamans tintinhamans changed the title ... fix(mesh): Fix the crash and endless retries when players can't connect Sep 26, 2026
@tintinhamans
tintinhamans force-pushed the arctic/go/fix/mesh-cannot-connect-crash branch from 812ecd1 to f5cfac3 Compare September 26, 2026 23:08
@tintinhamans
tintinhamans marked this pull request as ready for review September 26, 2026 23:09
@tintinhamans
tintinhamans marked this pull request as draft September 27, 2026 00:14
@tintinhamans tintinhamans changed the title fix(mesh): Fix the crash and endless retries when players can't connect fix(online): Make P2P connections and the lobby flow reliable Sep 27, 2026
@tintinhamans
tintinhamans force-pushed the arctic/go/fix/mesh-cannot-connect-crash branch 2 times, most recently from 08d4a89 to 06f1f3e Compare September 27, 2026 03:44
@tintinhamans
tintinhamans force-pushed the arctic/go/fix/mesh-cannot-connect-crash branch from 23ae419 to 2ef4f52 Compare September 27, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant