This commit is contained in:
Charles Lohr
2004-12-07 06:06:01 +00:00
parent 9e8cbeb8df
commit 295ae2d961
+9 -6
View File
@@ -816,12 +816,15 @@ void StepManiaLanServer::ServerChat(const CString& message)
bool StepManiaLanServer::CheckConnection(const unsigned int clientNum) bool StepManiaLanServer::CheckConnection(const unsigned int clientNum)
{ {
//If there is an error close the socket. //If there is an error close the socket.
if ( clientNum < Client.size() )
if (Client[clientNum]->clientSocket.IsError()) if ( clientNum >= Client.size() )
{ return false;
Disconnect(clientNum);
return false; if (Client[clientNum]->clientSocket.IsError())
} {
Disconnect(clientNum);
return false;
}
return true; return true;
} }