Browse Source

[Minor] Fix some errno handling

tags/1.2.0
Vsevolod Stakhov 8 years ago
parent
commit
b80a6871c4
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      src/fuzzy_storage.c

+ 7
- 1
src/fuzzy_storage.c View File

@@ -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));

Loading…
Cancel
Save