Add debug messages to terminate_gracefully()
This commit is contained in:
@ -190,21 +190,27 @@ static void terminate_gracefully(int sig) {
|
|||||||
sigaction(SIGINT, &act, NULL);
|
sigaction(SIGINT, &act, NULL);
|
||||||
sigaction(SIGTERM, &act, NULL);
|
sigaction(SIGTERM, &act, NULL);
|
||||||
|
|
||||||
|
debug("Closing listening sockets...");
|
||||||
for (int i = 0; i < NUM_SOCKETS; i++) {
|
for (int i = 0; i < NUM_SOCKETS; i++) {
|
||||||
close(sockets[i]);
|
close(sockets[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug("Stopping workers...");
|
||||||
cache_stop();
|
cache_stop();
|
||||||
workers_stop();
|
workers_stop();
|
||||||
|
debug("Destroying workers...");
|
||||||
workers_destroy();
|
workers_destroy();
|
||||||
|
|
||||||
logger_set_prefix("");
|
logger_set_prefix("");
|
||||||
|
debug("Closing proxy connections...");
|
||||||
proxy_close_all();
|
proxy_close_all();
|
||||||
|
|
||||||
|
debug("Closing client connections...");
|
||||||
while (list_size(clients) > 0)
|
while (list_size(clients) > 0)
|
||||||
tcp_close(clients[0]);
|
tcp_close(clients[0]);
|
||||||
logger_set_prefix("");
|
logger_set_prefix("");
|
||||||
|
|
||||||
|
debug("Stopping async loop...");
|
||||||
async_stop();
|
async_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user