From: Vsevolod Stakhov Date: Tue, 15 Mar 2016 11:53:00 +0000 (+0000) Subject: [Minor] Fix some errno handling X-Git-Tag: 1.2.0~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b80a6871c46587e14f95891a0b311885f3933e42;p=thirdparty%2Frspamd.git [Minor] Fix some errno handling --- diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index c275f66134..151a0ba648 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -1323,7 +1323,13 @@ rspamd_fuzzy_peer_io (gint fd, gshort what, gpointer d) r = read (fd, &cmd, sizeof (cmd)); if (r != sizeof (cmd)) { - msg_err ("cannot read command from peers: %s", strerror (errno)); + if (errno == EINTR) { + rspamd_fuzzy_peer_io (fd, what, d); + return; + } + if (errno != EAGAIN) { + msg_err ("cannot read command from peers: %s", strerror (errno)); + } } else { pcmd = g_slice_alloc (sizeof (*pcmd));