diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-22 09:38:47 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-22 09:38:47 +0100 |
commit | 884a962a1ef82431b60ce66bc83416898db4ad24 (patch) | |
tree | f25b5f5f7d0a1c05f7dd5a76fe9ac11bf3cafe93 /src/rspamd.c | |
parent | 261c54963d3e48834100180125a2a17e1759cb61 (diff) | |
download | rspamd-884a962a1ef82431b60ce66bc83416898db4ad24.tar.gz rspamd-884a962a1ef82431b60ce66bc83416898db4ad24.zip |
[Project] More work towards heartbeating logic implementation
Diffstat (limited to 'src/rspamd.c')
-rw-r--r-- | src/rspamd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rspamd.c b/src/rspamd.c index d0dd7ff10..08f91674b 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -59,6 +59,7 @@ #ifdef HAVE_OPENSSL #include <openssl/err.h> #include <openssl/evp.h> +#include <src/libserver/rspamd_control.h> #endif @@ -1030,6 +1031,7 @@ rspamd_cld_handler (EV_P_ ev_child *w, struct rspamd_main *rspamd_main, struct rspamd_worker *wrk) { gboolean need_refork; + static struct rspamd_control_command cmd; /* Turn off locking for logger */ ev_child_stop (EV_A_ w); @@ -1052,6 +1054,12 @@ rspamd_cld_handler (EV_P_ ev_child *w, struct rspamd_main *rspamd_main, close (wrk->srv_pipe[0]); } + cmd.type = RSPAMD_CONTROL_CHILD_CHANGE; + cmd.cmd.child_change.what = rspamd_child_terminated; + cmd.cmd.child_change.pid = wrk->pid; + cmd.cmd.child_change.additional = w->rstatus; + rspamd_control_broadcast_srv_cmd (rspamd_main, &cmd, wrk->pid); + REF_RELEASE (wrk->cf); if (wrk->finish_actions) { |