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 1049544..af46382 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 @@ -42,7 +42,10 @@ public class LobbyManager { */ public boolean handleConnect(Client client, AtomicBoolean running) { if (participants.containsKey(client.getId())) { - running.set(true); + LobbyConnection lobby = lobbies.get(participants.get(client.getId()).lobby); + if (lobby != null) { + running.set(lobby.state == LobbyConnectionState.Started); + } } return true; }