better partial message handling
This commit is contained in:
@@ -1243,6 +1243,9 @@ enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event)
|
||||
& buffer,
|
||||
1);
|
||||
|
||||
if (receivedLength == -2)
|
||||
continue;
|
||||
|
||||
if (receivedLength < 0)
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ enet_socket_receive (ENetSocket socket,
|
||||
|
||||
#ifdef HAS_MSGHDR_FLAGS
|
||||
if (msgHdr.msg_flags & MSG_TRUNC)
|
||||
return -1;
|
||||
return -2;
|
||||
#endif
|
||||
|
||||
if (address != NULL)
|
||||
|
||||
Reference in New Issue
Block a user