Browse Source

[Minor] Lua_redis: Allow requests with no callback

tags/2.0
Vsevolod Stakhov 4 years ago
parent
commit
0b628d0195
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      lualib/lua_redis.lua

+ 6
- 2
lualib/lua_redis.lua View File

@@ -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"

Loading…
Cancel
Save