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 = false but 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
pendingSteam entry at the top of the handler before re-adding
- Clean up
pendingSteam in the reject path of the join request callback
- Prevent duplicate
knownUsers entries on reconnect
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
Cause
In
SteamIntegration.InitCallbacks, theP2PSessionRequest_thandler guards with:The player's Steam ID is added to
pendingSteamwhen the first request arrives, but it is only removed inAcceptPlayerJoinRequest. It is never cleaned up when:accepted = falsebut does nothing)On reconnect, Steam fires a new
P2PSessionRequest_t, but the stalependingSteamentry causes the guard to skip the entire handler: no prompt, no accept call.Fix
pendingSteamentry at the top of the handler before re-addingpendingSteamin the reject path of the join request callbackknownUsersentries on reconnect