diff options
author | Boris Gulay <boris@gulay.name> | 2018-07-04 12:04:34 +0300 |
---|---|---|
committer | Boris Gulay <boris@gulay.name> | 2018-07-04 12:04:34 +0300 |
commit | 529f6147b59baa0421391e35ad2f0fba1a2dc46b (patch) | |
tree | d5001ea7a075443df1f92a9559e785eee726d760 | |
parent | 09ec061b6028754b6fe5ca74619780355b30ccfd (diff) | |
download | rspamd-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.
-rw-r--r-- | lualib/lua_redis.lua | 4 |
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 |