From eb2bf8a297c9d022afdfd752f3a2dfc21d353963 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 9 Dec 2014 17:35:39 +0000 Subject: [PATCH] Try to read fuzzy reply even if we have timeout. --- src/plugins/fuzzy_check.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 4162f164f..f4dc12f4a 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -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; } -- 2.39.5