]> source.dussan.org Git - rspamd.git/commitdiff
More fixes to fuzzy errors processing logic
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 9 Nov 2015 09:18:11 +0000 (09:18 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 9 Nov 2015 09:18:11 +0000 (09:18 +0000)
src/plugins/fuzzy_check.c

index 9834b4d6193691f03edd3a9cd78a9ca4f4ba659f..42549c978a99f1f5f5d4b4149d0562e574e66f37 100644 (file)
@@ -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 =