From 2ccd10e5666dc4443227b711750c8dfe66110b6b Mon Sep 17 00:00:00 2001 From: elexis Date: Wed, 8 Oct 2025 19:03:57 +0200 Subject: [PATCH] Fix missing returns after disconnect in 95179c5e467bd45. Patch by @elexis. The package sent in fa85527baf480a6 / #2420 plus this missing return causes the NetServerTurnManager to be stalled forever if a client succeeds to send this package on disconnect. In NotifyFinishedClientCommands, Disconnect calls OnDisconnect calls UninitialiseClient calls m_ClientsData.erase, but then m_ClientsData[client].readyTurn = turn; reinserts the disconnected client, making the turnmanager wait forever for the disconnected client. refs https://wildfiregames.com/forum/topic/134742-bug-game-incredibly-slowfreeze-at-start-because-because-of-1-player/ --- source/network/NetServerTurnManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/network/NetServerTurnManager.cpp b/source/network/NetServerTurnManager.cpp index 28f6e0d2f1..bf0edc6b55 100644 --- a/source/network/NetServerTurnManager.cpp +++ b/source/network/NetServerTurnManager.cpp @@ -69,6 +69,7 @@ void CNetServerTurnManager::NotifyFinishedClientCommands(CNetServerSession& sess m_ClientsData[client].readyTurn + 1); session.Disconnect(NDR_INCORRECT_READY_TURN_COMMANDS); + return; } m_ClientsData[client].readyTurn = turn; @@ -124,6 +125,7 @@ void CNetServerTurnManager::NotifyFinishedClientUpdate(CNetServerSession& sessio m_ClientsData[client].simulatedTurn + 1); session.Disconnect(NDR_INCORRECT_READY_TURN_SIMULATED); + return; } m_ClientsData[client].simulatedTurn = turn;