fix: only set runningGame to true if the client actually had a started game
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user