]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Terminate old workers after new workers are spawned
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Sep 2020 12:46:00 +0000 (13:46 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Sep 2020 12:46:00 +0000 (13:46 +0100)
src/rspamd.c

index a67e79165065ad80f28195e768ba9e3451807397..24ecfaa19249bb7b5ec96939023ce9a3e0daaa30 100644 (file)
@@ -1115,13 +1115,12 @@ rspamd_hup_handler (struct ev_loop *loop, ev_signal *w, int revents)
                g_hash_table_foreach (rspamd_main->workers, stop_srv_ev, rspamd_main);
 
                if (reread_config (rspamd_main)) {
-                       msg_info_main ("kill old workers");
-                       g_hash_table_foreach (rspamd_main->workers, kill_old_workers, NULL);
-
                        rspamd_check_core_limits (rspamd_main);
                        msg_info_main ("spawn workers with a new config");
                        spawn_workers (rspamd_main, rspamd_main->event_loop);
                        msg_info_main ("workers spawning has been finished");
+                       msg_info_main ("kill old workers");
+                       g_hash_table_foreach (rspamd_main->workers, kill_old_workers, NULL);
                }
                else {
                        /* Reattach old workers */