Merge pull request #22425 from Faless/enet_service

Set ENet service time to 0.
This commit is contained in:
Max Hilbrunner 2018-09-25 19:15:48 +02:00 committed by GitHub
commit efb730d950
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,13 +207,13 @@ void NetworkedMultiplayerENet::poll() {
_pop_current_packet();
ENetEvent event;
/* Wait up to 1000 milliseconds for an event. */
/* Keep servicing until there are no available events left in queue. */
while (true) {
if (!host || !active) // Might have been disconnected while emitting a notification
return;
int ret = enet_host_service(host, &event, 1);
int ret = enet_host_service(host, &event, 0);
if (ret < 0) {
// Error, do something?