From ba082b46bed8d1a15380ba35f37d1f74f2e0d47d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 7 Nov 2014 14:36:10 +0000 Subject: [PATCH] Soft shutdown should also set wanna_die flag. --- src/libserver/worker_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 631758829..0c304feb0 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -63,6 +63,7 @@ rspamd_worker_usr2_handler (gint fd, short what, void *arg) if (!wanna_die) { tv.tv_sec = SOFT_SHUTDOWN_TIME; tv.tv_usec = 0; + wanna_die = 1; rspamd_worker_stop_accept (sigh->worker); msg_info ("worker's shutdown is pending in %d sec", SOFT_SHUTDOWN_TIME); event_base_loopexit (sigh->base, &tv); -- 2.39.5