commit 02d842a: [Fix] Fuzzy_check: Fix timeouts

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Jul 26 10:56:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-26 11:51:20 +0100
URL: https://github.com/rspamd/rspamd/commit/02d842a709915be441146d9076e4e6b03f45deac (HEAD -> master)

[Fix] Fuzzy_check: Fix timeouts

---
 src/plugins/fuzzy_check.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 385c16b71..d8e98059c 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -2282,7 +2282,14 @@ fuzzy_check_io_callback (gint fd, short what, void *arg)
 
 		switch (r) {
 		case 0:
-			ret = return_want_more;
+			if (what & EV_READ) {
+				ret = return_want_more;
+			}
+			else {
+				/* It is actually time out */
+				fuzzy_check_timer_callback (fd, what, arg);
+				return;
+			}
 			break;
 		case 1:
 			ret = return_finished;


More information about the Commits mailing list