]> source.dussan.org Git - rspamd.git/commitdiff
Soft shutdown should also set wanna_die flag.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 7 Nov 2014 14:36:10 +0000 (14:36 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 7 Nov 2014 14:36:10 +0000 (14:36 +0000)
src/libserver/worker_util.c

index 6317588298996b3be435dbe430ff8a90bd0d075f..0c304feb0fd0503e261bfabad19e347a71093b86 100644 (file)
@@ -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);