1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix issue in ReceiveData

This commit is contained in:
Yaroslav Tretyakov
2016-07-24 14:01:14 -06:00
committed by Ted John
parent 291667d5bf
commit 3116ec3e76

View File

@@ -369,7 +369,12 @@ public:
}
int readBytes = recv(_socket, (char *)buffer, size, 0);
if (readBytes == SOCKET_ERROR || readBytes <= 0)
if (readBytes == 0)
{
*sizeReceived = 0;
return NETWORK_READPACKET_DISCONNECTED;
}
else if (readBytes == SOCKET_ERROR)
{
*sizeReceived = 0;
if (LAST_SOCKET_ERROR() != EWOULDBLOCK && LAST_SOCKET_ERROR() != EAGAIN)