diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-07-02 14:53:24 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-07-02 14:53:24 +0100 |
commit | b6f01cfb0c5fda0b92fc7d8e2e0f7c63d2a7b07f (patch) | |
tree | 4d07a9618f1867ed6835797ccec2a1b00013b3e2 /lualib/lua_scanners/fprot.lua | |
parent | 84e869eb4b74363b86c1da364e7063a82bc9375b (diff) | |
download | rspamd-b6f01cfb0c5fda0b92fc7d8e2e0f7c63d2a7b07f.tar.gz rspamd-b6f01cfb0c5fda0b92fc7d8e2e0f7c63d2a7b07f.zip |
[Rework] Pass upstream when sending TCP requests
Diffstat (limited to 'lualib/lua_scanners/fprot.lua')
-rw-r--r-- | lualib/lua_scanners/fprot.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lualib/lua_scanners/fprot.lua b/lualib/lua_scanners/fprot.lua index 35c4c943d..d2153f7ac 100644 --- a/lualib/lua_scanners/fprot.lua +++ b/lualib/lua_scanners/fprot.lua @@ -91,9 +91,6 @@ local function fprot_check(task, content, digest, rule, maybe_part) local function fprot_callback(err, data) if err then - -- set current upstream to fail because an error occurred - upstream:fail() - -- retry with another upstream until retransmits exceeds if retransmits > 0 then @@ -110,6 +107,7 @@ local function fprot_check(task, content, digest, rule, maybe_part) task = task, host = addr:to_string(), port = addr:get_port(), + upstream = upstream, timeout = rule['timeout'], callback = fprot_callback, data = { header, content, footer }, @@ -155,6 +153,7 @@ local function fprot_check(task, content, digest, rule, maybe_part) task = task, host = addr:to_string(), port = addr:get_port(), + upstream = upstream, timeout = rule['timeout'], callback = fprot_callback, data = { header, content, footer }, |