aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-10 15:31:50 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-10 15:31:50 +0100
commit3248490bf53a4cb30d800d21192ed6f6ec91ba3a (patch)
tree802f4e872e6fed35a8a0030b829827218c590662
parent42d0e0d659f70d26c7132d79ef1e2a9f26c597a7 (diff)
downloadrspamd-3248490bf53a4cb30d800d21192ed6f6ec91ba3a.tar.gz
rspamd-3248490bf53a4cb30d800d21192ed6f6ec91ba3a.zip
[Minor] Fix other AV engines retransmits
-rw-r--r--src/plugins/lua/antivirus.lua9
1 files changed, 9 insertions, 0 deletions
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(),