From a5ec2c936b82f71e7578bb84d2bf999bf32efad5 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 22 Feb 2023 10:19:36 +0100 Subject: [PATCH] added thread cancelling to why2_clean_threads --- src/chat/misc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/chat/misc.c b/src/chat/misc.c index 80d6a3a..2647a7c 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -225,6 +225,9 @@ void why2_clean_threads(void) node_buffer_2 = node_buffer; node_buffer = node_buffer -> next; + close(node_buffer_2 -> connection); + pthread_cancel(node_buffer_2 -> thread); + remove_node(node_buffer_2); //REMOVE } } \ No newline at end of file