aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-09 09:18:11 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-09 09:18:11 +0000
commit18e4eec3711b5db6f32c189877d3baebe551f548 (patch)
tree4e9cee1edcb4c2c154cb3e3125e8265c74abdcfe /src
parent49db5338e7573c59023a9966c58282884c7f5532 (diff)
downloadrspamd-18e4eec3711b5db6f32c189877d3baebe551f548.tar.gz
rspamd-18e4eec3711b5db6f32c189877d3baebe551f548.zip
More fixes to fuzzy errors processing logic
Diffstat (limited to 'src')
-rw-r--r--src/plugins/fuzzy_check.c7
1 files changed, 7 insertions, 0 deletions
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 =