]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix error when using plain unix socket in DCC plugin
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 15 Oct 2018 15:23:00 +0000 (16:23 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 15 Oct 2018 15:24:15 +0000 (16:24 +0100)
src/plugins/lua/dcc.lua

index 311dc608e0abc60b0ae2f2ad5713368dbbf51fda..8c5dddeeb13c995f4690a8b549bf0053d32ffad7 100644 (file)
@@ -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)