- 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:
parent
a1caf8c874
commit
c5907717f0
|
@ -849,10 +849,15 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
|
|||
ServerInterface *server = networkManager.getServerInterface();
|
||||
if(server->isClientConnected(playerIndex) == true) {
|
||||
ConnectionSlot *slot = server->getSlot(playerIndex);
|
||||
if(slot != NULL) {
|
||||
NetworkMessageQuit networkMessageQuit;
|
||||
slot->sendMessage(&networkMessageQuit);
|
||||
sleep(5);
|
||||
slot->close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] found nctDisconnectNetworkPlayer\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue