mirror of
https://github.com/glest/glest-source.git
synced 2025-08-27 01:44:23 +02:00
- ensure client that gets kicked knows he should also quit so he doesn't get a timeout message after disconnect
This commit is contained in:
@@ -849,7 +849,12 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
|
|||||||
ServerInterface *server = networkManager.getServerInterface();
|
ServerInterface *server = networkManager.getServerInterface();
|
||||||
if(server->isClientConnected(playerIndex) == true) {
|
if(server->isClientConnected(playerIndex) == true) {
|
||||||
ConnectionSlot *slot = server->getSlot(playerIndex);
|
ConnectionSlot *slot = server->getSlot(playerIndex);
|
||||||
slot->close();
|
if(slot != NULL) {
|
||||||
|
NetworkMessageQuit networkMessageQuit;
|
||||||
|
slot->sendMessage(&networkMessageQuit);
|
||||||
|
sleep(5);
|
||||||
|
slot->close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user