From 905c2004db67c25d8d825fd7dcd5058e7d0bbc17 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 27 Jan 2024 17:43:59 +0100 Subject: [PATCH] simplified server listening loop exit --- src/chat/misc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/chat/misc.c b/src/chat/misc.c index 69008ec..d6d3b5d 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -507,7 +507,7 @@ void *why2_listen_server(void *socket) printf(">>> "); fflush(stdout); - for (;;) + while (!exiting) { read = why2_read_socket(*((int*) socket)); @@ -541,7 +541,6 @@ void *why2_listen_server(void *socket) } why2_deallocate(read); - if (exiting) break; } return NULL;