From: Vsevolod Stakhov Date: Fri, 7 Nov 2014 14:36:10 +0000 (+0000) Subject: Soft shutdown should also set wanna_die flag. X-Git-Tag: 0.7.4~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ba082b46bed8d1a15380ba35f37d1f74f2e0d47d;p=rspamd.git Soft shutdown should also set wanna_die flag. --- 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);