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