From efa5ce38488f29adc47919f98be4e365beaf562f Mon Sep 17 00:00:00 2001 From: punchready Date: Mon, 7 Jun 2021 08:55:53 +0200 Subject: [PATCH] fix: remove stored sessions when clients get disconnected by the server --- .../teamname/marvelous/server/lobbymanager/LobbyManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java index 18dfd59..ede566b 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java @@ -143,6 +143,10 @@ public class LobbyManager { return; } + if(!byRemote) { + participants.remove(client.id); + } + Participant participant = participants.get(client.id); LobbyConnection lobby = lobbies.get(participant.lobby);