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.
This commit is contained in:
Maxim 2020-04-07 11:58:08 +02:00 committed by GitHub
parent 6991632abf
commit 33c7d6903e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1288,7 +1288,7 @@ enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event)
}
}
return -1;
return 0;
}
static void