aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-07 14:36:10 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-07 14:36:10 +0000
commitba082b46bed8d1a15380ba35f37d1f74f2e0d47d (patch)
treeec16a7b05894c48e29bee267cb5042651f18d06e
parent6a0b884f3d5c9ee32203ca033d179b4b7bf45f60 (diff)
downloadrspamd-ba082b46bed8d1a15380ba35f37d1f74f2e0d47d.tar.gz
rspamd-ba082b46bed8d1a15380ba35f37d1f74f2e0d47d.zip
Soft shutdown should also set wanna_die flag.
-rw-r--r--src/libserver/worker_util.c1
1 files changed, 1 insertions, 0 deletions
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);