aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-15 16:23:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-15 16:24:15 +0100
commite586826b09367be53f68ffa5329c1e5d99a35092 (patch)
treedf4cb77f010d5023777dd85826c25137d713dc27 /src/plugins
parent01ef5c03a62209a307b9ae355993c78fc909acbc (diff)
downloadrspamd-e586826b09367be53f68ffa5329c1e5d99a35092.tar.gz
rspamd-e586826b09367be53f68ffa5329c1e5d99a35092.zip
[Minor] Fix error when using plain unix socket in DCC plugin
Diffstat (limited to 'src/plugins')
-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)