Skip to content

fix(online): Harden mesh signalling, the lobby flow and server JSON parsing - #625

Open
tintinhamans wants to merge 9 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/fix/mesh-relay-and-lobby-exit
Open

tintinhamans wants to merge 9 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/fix/mesh-relay-and-lobby-exit

Conversation

@tintinhamans

@tintinhamans tintinhamans commented Sep 29, 2026 •

Copy link
Copy Markdown

Merge after #635.

Follow-up to #626 with the rest of the lobby and connection fixes. Includes #650, closed as folded into this PR.

The host no longer rejects a player the server told it to connect to just because its member list was stale. That looked like a clean close, so nobody retried. A lobby that returns 404 shows the "host left" notice, and out of order lobby responses are ignored, which stops false host changes and kicks. The host's start check times out after 30 s instead of leaving Start disabled.

Quick match no longer cancels the server's requeue when its lobby disappears, and a failed match join is shown instead of hanging. Server JSON is parsed without undefined behavior when a field is missing. The last lobby name is saved as UTF-8 (was #642).

UpdateSlotsFromCurrentLobby asked for the member at each slot position, so positions past the list got a default slot index 999999 that wrapped to 16959 in a uint16_t, and members without a usable slot were skipped silently. Members are now placed by their own SlotIndex and unclaimed slots are opened. A member without a valid slot keeps the previous roster and refetches the lobby, and match start waits until every human has a slot. The host's connectivity check no longer passes with no link to another human.

A peer that closed cleanly stayed in the mesh and logged [DISC] Recv Failed every 5 s. It is now removed from the mesh.

No wire or service change. Tested: z_generals builds, parser harness with bad SlotIndex values. The roster changes are not tested in a real lobby.

@tintinhamans
tintinhamans force-pushed the arctic/go/fix/mesh-relay-and-lobby-exit branch from 7864452 to cfde97b Compare September 29, 2026 21:00
@tintinhamans tintinhamans changed the title fix(mesh): Give joiners working relays and stop stale lobby exits fix(lobby): Harden the lobby and connection flow Sep 29, 2026
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