summaryrefslogtreecommitdiffstats
path: root/src/rspamd.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-07 14:31:08 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-07 14:31:08 +0000
commit296c0cd69431ffc59b12adff6b3d58c9069f81ff (patch)
tree61df11a3683644cee24310467e22e2d3b9c55435 /src/rspamd.c
parent5172bac9ff82d0abc316d40b61cec13b91903a1a (diff)
downloadrspamd-296c0cd69431ffc59b12adff6b3d58c9069f81ff.tar.gz
rspamd-296c0cd69431ffc59b12adff6b3d58c9069f81ff.zip
[Rework] Rework final scripts logic
Diffstat (limited to 'src/rspamd.c')
-rw-r--r--src/rspamd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/rspamd.c b/src/rspamd.c
index 495da45d9..4099e5003 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -691,8 +691,8 @@ kill_old_workers (gpointer key, gpointer value, gpointer unused)
rspamd_main = w->srv;
- if (!w->wanna_die) {
- w->wanna_die = TRUE;
+ if (w->state == rspamd_worker_state_running) {
+ w->state = rspamd_worker_state_terminating;
kill (w->pid, SIGUSR2);
ev_io_stop (rspamd_main->event_loop, &w->srv_ev);
msg_info_main ("send signal to worker %P", w->pid);
@@ -1095,10 +1095,6 @@ rspamd_cld_handler (EV_P_ ev_child *w, struct rspamd_main *rspamd_main,
rspamd_control_broadcast_srv_cmd (rspamd_main, &cmd, wrk->pid);
}
- if (wrk->finish_actions) {
- g_ptr_array_free (wrk->finish_actions, TRUE);
- }
-
need_refork = rspamd_check_termination_clause (wrk->srv, wrk, w->rstatus);
if (need_refork) {