Skip to content

feat(lobby): Retry failed peer connections and block the start until everyone is connected - #669

Open
tintinhamans wants to merge 11 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/feat/lobby-connection-retry-v2
Open

tintinhamans wants to merge 11 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/feat/lobby-connection-retry-v2

Conversation

@tintinhamans

@tintinhamans tintinhamans commented Oct 25, 2026 •

Copy link
Copy Markdown

Merge after #625 and #656. The branch carries #625 and the shared network settings commit of #656, so the diff against main shows both; the only new code is the last commit.

In a custom lobby a peer link that fails to come up is dropped after two signalling attempts and nothing tries it again. The host can still press Start with a player who has no link to the others, and a failed link in a quick match sends everyone out of the lobby.

This retries failed peer links. The later joiner of a pair keeps signalling, a manual lobby stays open when links run out, and the button turns into "Retry connections" while a link is down. A retry uses a longer timeout than the first negotiation, and an incoming connection gets the same timeouts. A peer that left cleanly is never retried, it is dropped from the mesh as #625 does.

Start follows one rule. It is enabled only when every human in the lobby has a slot and we hold a connected link to every human. The mesh check and the final check before the match both use that rule, and a start attempt that no longer matches the lobby is dropped. If the lobby lists someone the game has no slot for, the lobby is refreshed every few seconds. The 30 second timeout of the mesh check from #625 still ends the check and gives the Start button back.

One new key in the connection group of the service config, read like the others from #656: connection.reconnect_timeout_ms (30000, clamped between 10000 and 60000). connection.retry_signalling is already there from #656 and gates the retry. A missing key keeps the default.

Tested: x86 Release z_generals builds. Not played yet.

@tintinhamans
tintinhamans force-pushed the arctic/go/feat/lobby-connection-retry-v2 branch 4 times, most recently from 4525f55 to ab2e816 Compare October 26, 2026 15:39
@tintinhamans
tintinhamans force-pushed the arctic/go/feat/lobby-connection-retry-v2 branch from ab2e816 to d0b8bcf Compare October 28, 2026 01:47
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