diff options
Diffstat (limited to 'lualib/lua_redis.lua')
-rw-r--r-- | lualib/lua_redis.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua index 67bf271ab..f3ff6d400 100644 --- a/lualib/lua_redis.lua +++ b/lualib/lua_redis.lua @@ -865,7 +865,9 @@ local function rspamd_redis_make_request(task, redis_params, key, is_write, else addr:ok() end - callback(err, data, addr) + if callback then + callback(err, data, addr) + end end if not task or not redis_params or not callback or not command then return false,nil,nil @@ -965,7 +967,9 @@ local function redis_make_request_taskless(ev_base, cfg, redis_params, key, else addr:ok() end - callback(err, data, addr) + if callback then + callback(err, data, addr) + end end local rspamd_redis = require "rspamd_redis" |