Merge pull request #166 from teamfisk/FixNetworkBugs

Hot fix: Infinite loop when a player disconnected from the server.
This commit is contained in:
Adam Byléhn
2016-03-03 18:22:13 +01:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ int UDPClient::readBuffer()
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
if (sizeOfPacket > m_Socket->available()) {
LOG_WARNING("UDPClient::readBuffer(): We haven't got the whole packet yet.");
return 0;
//return 0;
}
// if the buffer is to small increase the size of it
if (sizeOfPacket > m_BufferSize) {
+1 -1
View File
@@ -94,7 +94,7 @@ int UDPServer::readBuffer()
if (sizeOfPacket > m_Socket->available()) {
LOG_WARNING("UDPServer::readBuffer(): We haven't got the whole packet yet.");
return 0;
//return 0;
}
// if the buffer is to small increase the size of it