]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix other AV engines retransmits
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 May 2018 14:31:50 +0000 (15:31 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 May 2018 14:31:50 +0000 (15:31 +0100)
src/plugins/lua/antivirus.lua

index d5dc63ae0a98f67af421fcacc2238b1c04924988..9464007439b9dbdb8422b271c7a929418181cfed 100644 (file)
@@ -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(),