From beec1991921a0d2163d061297ae123e0f1da72df Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Sat, 8 Jul 2023 01:10:07 +0200 Subject: [PATCH] Add debug messages to terminate_gracefully() --- src/server.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server.c b/src/server.c index 35e3060..ab229d5 100644 --- a/src/server.c +++ b/src/server.c @@ -190,21 +190,27 @@ static void terminate_gracefully(int sig) { sigaction(SIGINT, &act, NULL); sigaction(SIGTERM, &act, NULL); + debug("Closing listening sockets..."); for (int i = 0; i < NUM_SOCKETS; i++) { close(sockets[i]); } + debug("Stopping workers..."); cache_stop(); workers_stop(); + debug("Destroying workers..."); workers_destroy(); logger_set_prefix(""); + debug("Closing proxy connections..."); proxy_close_all(); + debug("Closing client connections..."); while (list_size(clients) > 0) tcp_close(clients[0]); logger_set_prefix(""); + debug("Stopping async loop..."); async_stop(); }