]> source.dussan.org Git - rspamd.git/commitdiff
Try to read fuzzy reply even if we have timeout.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Dec 2014 17:35:39 +0000 (17:35 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Dec 2014 17:35:39 +0000 (17:35 +0000)
src/plugins/fuzzy_check.c

index 4162f164fc70e0015e3a6455045efe6567f37d5a..f4dc12f4a33b753c4da4eeff2d1964297d260d93 100644 (file)
@@ -521,10 +521,11 @@ fuzzy_io_callback (gint fd, short what, void *arg)
                        event_del (&session->ev);
                        event_set (&session->ev, fd, EV_READ, fuzzy_io_callback, session);
                        event_add (&session->ev, &session->tv);
+                       session->state = 1;
                }
        }
-       else if (what == EV_READ) {
-               /* Got reply */
+       else if (session->state == 1) {
+               /* Try to read reply */
                if ((r = read (fd, buf, sizeof (buf) - 1)) == -1) {
                        ret = -1;
                }