aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-09 17:35:39 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-09 17:35:39 +0000
commitd50bc424eaa82655dc56d1e314028f0cfe2fe745 (patch)
treee45d350d3d3a22ba797f613e28e66b4d9f64b42a /src
parent6a45a186ab2252c4da7f74c685c25f6bde9ae716 (diff)
downloadrspamd-d50bc424eaa82655dc56d1e314028f0cfe2fe745.tar.gz
rspamd-d50bc424eaa82655dc56d1e314028f0cfe2fe745.zip
Try to read fuzzy reply even if we have timeout.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/fuzzy_check.c5
1 files 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;
}