summaryrefslogtreecommitdiffstats
path: root/src/libserver/rspamd_control.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-27 15:02:46 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-27 15:02:46 +0000
commit306d01b6fcf560a1905164e7f428c9989ac4e5fc (patch)
tree6f236de48365f8693cbc7973a903a65f41dd0771 /src/libserver/rspamd_control.c
parent46ff8098925af138a68a4df0b4c6625331c5a6c3 (diff)
downloadrspamd-306d01b6fcf560a1905164e7f428c9989ac4e5fc.tar.gz
rspamd-306d01b6fcf560a1905164e7f428c9989ac4e5fc.zip
Fix forking and epoll/kqueue
Diffstat (limited to 'src/libserver/rspamd_control.c')
-rw-r--r--src/libserver/rspamd_control.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c
index 7eac7104a..58147178f 100644
--- a/src/libserver/rspamd_control.c
+++ b/src/libserver/rspamd_control.c
@@ -516,6 +516,13 @@ rspamd_srv_handler (gint fd, short what, gpointer ud)
msg_err ("cannot read from worker's srv pipe: %s",
strerror (errno));
}
+ else if (r == 0) {
+ /*
+ * Usually this means that a worker is dead, so do not try to read
+ * anything
+ */
+ event_del (&worker->srv_ev);
+ }
else if (r != sizeof (cmd)) {
msg_err ("cannot read from worker's srv pipe incomplete command: %d",
(gint) r);