Skip to content

fix(lobby): Make the lobby server thread-safe - #66

Merged
x64-dev merged 12 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/fix/lobby-concurrency
Sep 28, 2026
Merged

x64-dev merged 12 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/fix/lobby-concurrency

Conversation

@tintinhamans

Copy link
Copy Markdown
Contributor

Lobby state was changed from HTTP handlers, websocket handlers and timers without consistent locking. That allowed duplicate lobby IDs, slot corruption during host migration, and leaves that finished after the next create or join.

  • Lobby IDs and anti-cheat probe counters are atomic.
  • Every change to a lobby goes through one per-lobby gate, including host migration, CloseOpenSlots and kicks. The kick's removal runs after the gate is released.
  • LeaveAnyLobby is awaited on create, join and delete.
  • slot_state and lobby update fields are validated (400 on bad values).
  • The session sweep re-checks before destroying a session, so a reconnect can't lose its lobby. The reconnect grace period is configurable.

@tintinhamans
tintinhamans force-pushed the arctic/fix/lobby-concurrency branch from 122d05f to c7c7d49 Compare September 27, 2026 04:20
@x64-dev
x64-dev merged commit 6b781ba into GeneralsOnlineDevelopmentTeam:main Sep 28, 2026
16 checks passed
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.

2 participants