From a5b53f56d5fc68111069512b9775e646a0c00612 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Thu, 24 Nov 2016 10:01:48 +0200 Subject: [PATCH] [Minor] Fix some logging in antivirus module --- src/plugins/lua/antivirus.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 6060b0e89..87ebcf99c 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -194,7 +194,9 @@ local function check_av_cache(task, rule, fn) yield_result(task, rule, data) end else - rspamd_logger.errx(task, 'Got error checking cache: %1', err) + if err then + rspamd_logger.errx(task, 'Got error checking cache: %1', err) + end fn() end end -- 2.39.5