diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-27 15:02:46 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-27 15:02:46 +0000 |
commit | 306d01b6fcf560a1905164e7f428c9989ac4e5fc (patch) | |
tree | 6f236de48365f8693cbc7973a903a65f41dd0771 /src/libserver/rspamd_control.c | |
parent | 46ff8098925af138a68a4df0b4c6625331c5a6c3 (diff) | |
download | rspamd-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.c | 7 |
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); |