diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-04 16:05:46 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-04 16:05:46 +0000 |
commit | 7d237da3934bec416fab604af74f61e8c53f0505 (patch) | |
tree | 67e6f07c6c3531b2a9fe318863c24e2bcec2608c /src/libserver/rspamd_control.c | |
parent | cd60c1621b2f90aede6584a490aa2a8abf897980 (diff) | |
download | rspamd-7d237da3934bec416fab604af74f61e8c53f0505.tar.gz rspamd-7d237da3934bec416fab604af74f61e8c53f0505.zip |
[Minor] Slightly improve logging in case of termination
Diffstat (limited to 'src/libserver/rspamd_control.c')
-rw-r--r-- | src/libserver/rspamd_control.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c index 503825184..e119e64d4 100644 --- a/src/libserver/rspamd_control.c +++ b/src/libserver/rspamd_control.c @@ -655,10 +655,15 @@ rspamd_control_default_worker_handler (EV_P_ ev_io *w, int revents) r = recvmsg (w->fd, &msg, 0); if (r == -1) { - msg_err ("cannot read request from the control socket: %s", - strerror (errno)); - if (errno != EAGAIN && errno != EINTR) { + if (errno != ECONNRESET) { + /* + * In case of connection reset it means that main process + * has died, so do not pollute logs + */ + msg_err ("cannot read request from the control socket: %s", + strerror (errno)); + } ev_io_stop (cd->ev_base, &cd->io_ev); close (w->fd); } |