From 18e4eec3711b5db6f32c189877d3baebe551f548 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 9 Nov 2015 09:18:11 +0000 Subject: [PATCH] More fixes to fuzzy errors processing logic --- src/plugins/fuzzy_check.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 9834b4d61..42549c978 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -1067,6 +1067,11 @@ fuzzy_controller_io_callback (gint fd, short what, void *arg) } else if (what == EV_READ) { if ((r = read (fd, buf, sizeof (buf) - 1)) == -1) { + if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) { + event_add (&session->ev, NULL); + return; + } + msg_info_task ("cannot process fuzzy hash for message <%s>: %s", session->task->message_id, strerror (errno)); if (*(session->err) == NULL) { @@ -1078,6 +1083,8 @@ fuzzy_controller_io_callback (gint fd, short what, void *arg) } else { p = buf; + ret = 0; + while ((rep = fuzzy_process_reply (&p, &r, session->commands, session->rule)) != NULL) { if ((map = -- 2.39.5