aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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(),