mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Fixed Client connection delegate bug
#story[1250]
This commit is contained in:
@@ -223,12 +223,14 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
|
||||
ServerToClientThread closedConnection = null;
|
||||
for (ServerToClientThread serverToClientThread : serverToClientThreads) {
|
||||
if (serverToClientThread.getSocket() == player.getSocket()) {
|
||||
serverToClientThreads.remove(closedConnection);
|
||||
closedConnection.terminate();
|
||||
closedConnection = serverToClientThread;
|
||||
}
|
||||
}
|
||||
|
||||
if (GameState.getCurrentStage() != GameStages.RACING) {
|
||||
serverToClientThreads.remove(closedConnection);
|
||||
closedConnection.terminate();
|
||||
|
||||
if (GameState.getCurrentStage() == GameStages.LOBBYING) {
|
||||
sendSetupMessages();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user