theoretically reworked packet structure for gamestart event + fixed client issue flooding the server with packets

This commit is contained in:
2024-01-15 10:26:14 +01:00
parent afa2d779a1
commit 1a9f49f5e9
30 changed files with 205 additions and 34 deletions

View File

@ -102,6 +102,9 @@ class NetworkManager:
if e.errno == 10054:
self.__gameManager.getLogger().error(f"Connection with {client_address} forcibly closed by remote host.")
players = self.__gameManager.getPlayers()
self.__gameManager.removePlayers(client_address)
self.__gameManager.getLogger().info(f"new player length {len(players)}")
break
self.__gameManager.getLogger().error(f"Socket error receiving data from {client_address}: {e}")