From 0345eb39cd6c9ad71d1cec1d3eab106a8df95cc2 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sun, 11 Aug 2019 15:44:47 +0300 Subject: [PATCH] Master: Sleep for more than 1ms when idle --- src/mastersrv/master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mastersrv/master.c b/src/mastersrv/master.c index 304f6b5..1dfed7d 100644 --- a/src/mastersrv/master.c +++ b/src/mastersrv/master.c @@ -278,7 +278,7 @@ int main (int argc, char *argv[]) { enet_uint8 proto = 0; enet_uint8 pw = 0; while (!shutdown) { - while (enet_host_service(ms_host, &event, 1) > 0) { + while (enet_host_service(ms_host, &event, 5000) > 0) { switch (event.type) { case ENET_EVENT_TYPE_CONNECT: printf(LC_MS_CONN, event.peer->address.host, event.peer->address.port); -- 2.29.2