aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-09 13:00:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-09 13:00:18 +0000
commit4a55801321da466d1e2fe41b10a73b0976ccc8fa (patch)
tree328add5903d8e595ea7a84b27ef4062af2196cff /lualib
parent4872d72a2b3d3080d37763ccb9a2142cc82da75e (diff)
downloadrspamd-4a55801321da466d1e2fe41b10a73b0976ccc8fa.tar.gz
rspamd-4a55801321da466d1e2fe41b10a73b0976ccc8fa.zip
[Minor] Fix redis-less setup
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_redis.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua
index e79534c6f..79ea64651 100644
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@ -820,7 +820,9 @@ local function load_script_taskless(script, cfg, ev_base)
end
local function load_redis_script(script, cfg, ev_base, _)
- load_script_taskless(script, cfg, ev_base)
+ if script.redis_params then
+ load_script_taskless(script, cfg, ev_base)
+ end
end
local function add_redis_script(script, redis_params)
@@ -852,6 +854,10 @@ local function exec_redis_script(id, params, callback, keys, args)
end
local script = redis_scripts[id]
+ if not script.redis_params then
+ callback('no redis servers defined', nil)
+ return true
+ end
local function do_call(can_reload)
local function redis_cb(err, data)