bugfix to properly close socket when connected client leaves game lobby

This commit is contained in:
Mark Vejvoda
2013-05-23 07:12:29 +00:00
parent 497dac4189
commit 3746bf4f11
3 changed files with 68 additions and 1 deletions

View File

@@ -243,7 +243,10 @@ ClientInterface::~ClientInterface() {
if(lang.hasString("PlayerLeftGame",languageList[i]) == true) {
sQuitText = lang.get("PlayerLeftGame",languageList[i]);
}
sendTextMessage(sQuitText,-1,false,languageList[i]);
if(clientSocket != NULL && clientSocket->isConnected() == true) {
sendTextMessage(sQuitText,-1,false,languageList[i]);
}
}
}