aboutsummaryrefslogtreecommitdiffhomepage
path: root/protocol.c
diff options
context:
space:
mode:
authorLee Salzman <[email protected]>2023-07-23 21:05:47 -0400
committerLee Salzman <[email protected]>2023-07-23 21:05:47 -0400
commit2a85cd64459f6ba038d233a634d9440490dbba12 (patch)
tree357ac6030b33ea1fc05ba5fea8ee7ea8b76a2808 /protocol.c
parentea4607a90dbfbcf4da2669ea998585253d8e70b1 (diff)
downloadenet-2a85cd64459f6ba038d233a634d9440490dbba12.tar.gz
enet-2a85cd64459f6ba038d233a634d9440490dbba12.zip
better partial message handling
Diffstat (limited to 'protocol.c')
-rw-r--r--protocol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocol.c b/protocol.c
index b7af48d..73e8056 100644
--- a/protocol.c
+++ b/protocol.c
@@ -1243,6 +1243,9 @@ enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event)
& buffer,
1);
+ if (receivedLength == -2)
+ continue;
+
if (receivedLength < 0)
return -1;