commit 7f46e56: [Minor] Set addr failure flag on fuzzy errors

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Feb 18 16:56:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-02-18 16:51:26 +0000
URL: https://github.com/rspamd/rspamd/commit/7f46e560b0aad533e49d592bc893b14efba1389d (HEAD -> master)

[Minor] Set addr failure flag on fuzzy errors

---
 src/plugins/fuzzy_check.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 58cdd3376..467a67ed7 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -2213,11 +2213,12 @@ fuzzy_check_io_callback (gint fd, short what, void *arg)
 			session->state == 1 ? "read" : "write",
 			errno,
 			strerror (errno));
-		rspamd_upstream_fail (session->server, FALSE);
+		rspamd_upstream_fail (session->server, TRUE);
 
 		if (session->item) {
 			rspamd_symcache_item_async_dec_check (session->task, session->item, M);
 		}
+
 		rspamd_session_remove_event (session->task->s, fuzzy_io_fin, session);
 	}
 	else {
@@ -2257,7 +2258,8 @@ fuzzy_check_timer_callback (gint fd, short what, void *arg)
 				rspamd_inet_address_to_string_pretty (
 						rspamd_upstream_addr_cur (session->server)),
 				session->retransmits);
-		rspamd_upstream_fail (session->server, FALSE);
+		rspamd_upstream_fail (session->server, TRUE);
+
 		if (session->item) {
 			rspamd_symcache_item_async_dec_check (session->task, session->item, M);
 		}
@@ -2563,7 +2565,7 @@ fuzzy_controller_timer_callback (gint fd, short what, void *arg)
 	task = session->task;
 
 	if (session->retransmits >= session->rule->ctx->retransmits) {
-		rspamd_upstream_fail (session->server, FALSE);
+		rspamd_upstream_fail (session->server, TRUE);
 		msg_err_task_check ("got IO timeout with server %s(%s), "
 				"after %d retransmits",
 				rspamd_upstream_name (session->server),


More information about the Commits mailing list