summaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorBoris Gulay <boris@gulay.name>2018-07-04 12:04:34 +0300
committerBoris Gulay <boris@gulay.name>2018-07-04 12:04:34 +0300
commit529f6147b59baa0421391e35ad2f0fba1a2dc46b (patch)
treed5001ea7a075443df1f92a9559e785eee726d760 /lualib
parent09ec061b6028754b6fe5ca74619780355b30ccfd (diff)
downloadrspamd-529f6147b59baa0421391e35ad2f0fba1a2dc46b.tar.gz
rspamd-529f6147b59baa0421391e35ad2f0fba1a2dc46b.zip
Fix redis read_only was incorrectly set to true.
We should use local variables in this check because result['xxx'] are assigned later.
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_redis.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua
index d22a4010c..33757b154 100644
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@ -110,9 +110,9 @@ local function try_load_redis_servers(options, rspamd_config, result)
result['password'] = options['password']
end
- if read_only and not result.write_servers then
+ if read_only and not upstreams_write then
result.read_only = true
- elseif result.write_servers then
+ elseif upstreams_write then
result.read_only = false
end