From e586826b09367be53f68ffa5329c1e5d99a35092 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 15 Oct 2018 16:23:00 +0100 Subject: [PATCH] [Minor] Fix error when using plain unix socket in DCC plugin --- src/plugins/lua/dcc.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.39.5