From 3248490bf53a4cb30d800d21192ed6f6ec91ba3a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 10 May 2018 15:31:50 +0100 Subject: [PATCH] [Minor] Fix other AV engines retransmits --- src/plugins/lua/antivirus.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index d5dc63ae0..946400743 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -382,6 +382,9 @@ local function fprot_check(task, rule) if err == 'IO timeout' then if retransmits > 0 then retransmits = retransmits - 1 + -- Select a different upstream! + upstream = rule.upstreams:get_upstream_round_robin() + addr = upstream:get_addr() tcp.request({ task = task, host = addr:to_string(), @@ -548,6 +551,9 @@ local function sophos_check(task, rule) if err == 'IO timeout' then if retransmits > 0 then retransmits = retransmits - 1 + -- Select a different upstream! + upstream = rule.upstreams:get_upstream_round_robin() + addr = upstream:get_addr() tcp.request({ task = task, host = addr:to_string(), @@ -713,6 +719,9 @@ local function savapi_check(task, rule) if err == 'IO timeout' then if retransmits > 0 then retransmits = retransmits - 1 + -- Select a different upstream! + upstream = rule.upstreams:get_upstream_round_robin() + addr = upstream:get_addr() tcp.request({ task = task, host = addr:to_string(), -- 2.39.5