From 7d37daa32d544f5170742530ec997d67cf3a3e1f Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 24 Jan 2024 18:29:02 +0100 Subject: [PATCH] preventing server from crashing on client crash --- src/chat/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat/misc.c b/src/chat/misc.c index 2eefb4a..9f478d7 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -398,7 +398,7 @@ void *why2_communicate_thread(void *arg) raw_ptr = NULL; } - why2_send_socket(WHY2_CHAT_CODE_SSQC, WHY2_CHAT_SERVER_USERNAME, connection); + if (exiting) why2_send_socket(WHY2_CHAT_CODE_SSQC, WHY2_CHAT_SERVER_USERNAME, connection); printf("User disconnected.\t%d\n", connection);