aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-02 13:46:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-02 13:46:00 +0100
commita742fed63c2568df41d718c71944460ffd8ebbda (patch)
treed7be881fb618ce4224c64bc83f12395ef7d3cedd /src
parent54daeb811d83f5d4e29e208e7285c669d123f606 (diff)
downloadrspamd-a742fed63c2568df41d718c71944460ffd8ebbda.tar.gz
rspamd-a742fed63c2568df41d718c71944460ffd8ebbda.zip
[Minor] Terminate old workers after new workers are spawned
Diffstat (limited to 'src')
-rw-r--r--src/rspamd.c5
1 files changed, 2 insertions, 3 deletions
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 */