forked from rosebudai/OpenRCT2-Web
Fix issue in ReceiveData
This commit is contained in:
1 parent
291667d5bf
commit
3116ec3e76
1 file changed
+6
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user