diff options
author | Maxim <[email protected]> | 2020-04-07 11:58:08 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-07 11:58:08 +0200 |
commit | 33c7d6903e843d450eb18769d5802e83de538825 (patch) | |
tree | 0264b6853e56dc32d3c8e6f02135df8c8c65658c /protocol.c | |
parent | 6991632abf1af161f332bf38bd8517c7c2834b58 (diff) | |
download | enet-33c7d6903e843d450eb18769d5802e83de538825.tar.gz enet-33c7d6903e843d450eb18769d5802e83de538825.zip |
Return 0 instead of -1 on enet_protocol_receive_incoming_commands
Return 0 instead of -1 on enet_protocol_receive_incoming_commands when nothing received.
This allows the Service loop to continue running and not return an error when there is nothing to do with the socket receive.
From debugging I found sometimes the enet_protocol_receive_incoming_commands returns -1 because simply nothing happened in the 256 for loop.
Other functions like enet_protocol_send_outgoing_commands return 0 when nothing happened.
Diffstat (limited to 'protocol.c')
-rw-r--r-- | protocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1288,7 +1288,7 @@ enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event) } } - return -1; + return 0; } static void |