-
-
Notifications
You must be signed in to change notification settings - Fork 137
Description
Bug Description
When connecting via Steam (non-auto-accept), if the connecting player disconnects before being accepted — for example by clicking "Fix & Restart" on the mod mismatch window — the host is unable to accept them on subsequent connection attempts. The player gets stuck at "waiting for host to accept" indefinitely. The host must restart their game to be able to accept the player again.
Steps to Reproduce
- Host starts a multiplayer game with Steam networking (auto-accept disabled)
- Player connects via Steam: host gets the accept/reject prompt
- Before the host clicks Accept, the player disconnects (e.g. clicks "Fix & Restart" in the mod mismatch window)
- Player's game restarts and attempts to reconnect
- Bug: Host never receives a new accept prompt. Player is stuck at "waiting for host."
Cause
In SteamIntegration.InitCallbacks, the P2PSessionRequest_t handler guards with:
if (... && !session.pendingSteam.Contains(req.m_steamIDRemote))The player's Steam ID is added to pendingSteam when the first request arrives, but it is only removed in AcceptPlayerJoinRequest. It is never cleaned up when:
- The host clicks Reject (callback runs with
accepted = falsebut does nothing) - The player disconnects before the host responds (callback is never invoked)
On reconnect, Steam fires a new P2PSessionRequest_t, but the stale pendingSteam entry causes the guard to skip the entire handler: no prompt, no accept call.
Fix
- Remove the blocking guard; instead, unconditionally clear any stale
pendingSteamentry at the top of the handler before re-adding - Clean up
pendingSteamin the reject path of the join request callback - Prevent duplicate
knownUsersentries on reconnect