From: Vsevolod Stakhov Date: Wed, 2 Sep 2020 12:46:00 +0000 (+0100) Subject: [Minor] Terminate old workers after new workers are spawned X-Git-Tag: 2.6~87 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a742fed63c2568df41d718c71944460ffd8ebbda;p=rspamd.git [Minor] Terminate old workers after new workers are spawned --- diff --git a/src/rspamd.c b/src/rspamd.c index a67e79165..24ecfaa19 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -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 */