aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/lua/dcc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/lua/dcc.lua b/src/plugins/lua/dcc.lua
index 311dc608e..8c5dddeeb 100644
--- a/src/plugins/lua/dcc.lua
+++ b/src/plugins/lua/dcc.lua
@@ -128,10 +128,11 @@ local function check_dcc (task)
else
rspamd_logger.errx(task, 'failed to scan, maximum retransmits exceed')
- upstream:fail()
+ if upstream then upstream:fail() end
end
else
-- Parse the response
+ if upstream then upstream:ok() end
local _,_,result,disposition,header = tostring(data):find("(.-)\n(.-)\n(.-)\n")
lua_util.debugm(N, task, 'DCC result=%1 disposition=%2 header="%3"',
result, disposition, header)