summaryrefslogtreecommitdiff
path: root/modules/enet/networked_multiplayer_enet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/enet/networked_multiplayer_enet.cpp')
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index 0a1061f92e..7b5fd854ff 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -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?
@@ -293,7 +293,7 @@ void NetworkedMultiplayerENet::poll() {
encode_uint32(*id, &packet->data[4]);
enet_peer_send(E->get(), SYSCH_CONFIG, packet);
}
- } else if (!server) {
+ } else {
emit_signal("server_disconnected");
close_connection();
return;