0ad/source/network
elexis 7c6d2eef93
Erase client state hash on disconnect
Fix `NetServerTurnManager` from pausing the simulation forever after a
client sent a bad hash to it and disconnects before the bad hash has
been processed.

A client that sends a wrong simulation hash to the `NetServer` and
disconnects before the server compares that hash causes a message box to
appear and the game to be paused forever.
94e5d88169 introduced the bug by missing to delete `m_ClientStateHashes
upon `UninitialiseClient.
This causes `m_ClientData[hashPair.first].isOOS = true` to insert a
client with blank values that the `NetServerTurnManager` will wait
forever and hence the message box about an OOS with no players being OOS
is shown (the playername is emptystring).

5ebf2020b0 exposed the bug by making observers able to lag behind,
providing a longe enough timeframe for this to occur.

Fix:
Deleting `m_ClientStateHashes` upon disconnect solves the broken
message box and the pausing.

(cherry picked from commit d12c015d43)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-23 10:34:26 +01:00
..
scripting Multiplayer saved games 2024-12-19 21:36:51 +01:00
tests Enable multiple RequestTypes 2024-12-19 21:36:51 +01:00
FSM.h Make CFsm a template 2024-05-04 16:13:02 +00:00
NetClient.cpp Multiplayer saved games 2024-12-19 21:36:51 +01:00
NetClient.h Multiplayer saved games 2024-12-19 21:36:51 +01:00
NetClientTurnManager.cpp Replace usage of OSString().c_str() by OSString 2024-10-28 16:35:49 +01:00
NetClientTurnManager.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NetEnet.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NetEnet.h Use a lower default MTU for ENet hosts, and make it configurable. 2023-04-10 08:21:07 +00:00
NetFileTransfer.cpp Enable multiple RequestTypes 2024-12-19 21:36:51 +01:00
NetFileTransfer.h Enable multiple RequestTypes 2024-12-19 21:36:51 +01:00
NetHost.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NetHost.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NetMessage.cpp Multiplayer saved games 2024-12-19 21:36:51 +01:00
NetMessage.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NetMessages.h Multiplayer saved games 2024-12-19 21:36:51 +01:00
NetMessageSim.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NetServer.cpp Multiplayer saved games 2024-12-19 21:36:51 +01:00
NetServer.h Multiplayer saved games 2024-12-19 21:36:51 +01:00
NetServerTurnManager.cpp Erase client state hash on disconnect 2024-12-23 10:34:26 +01:00
NetServerTurnManager.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NetSession.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NetSession.h Make CFsm a template 2024-05-04 16:13:02 +00:00
NetStats.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NetStats.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
NMTCreator.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
Serialization.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
StringConverters.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
StunClient.cpp Reduce time needed for STUN 2024-08-23 21:00:15 +02:00
StunClient.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00