From: Boris Gulay Date: Wed, 4 Jul 2018 09:04:34 +0000 (+0300) Subject: Fix redis read_only was incorrectly set to true. X-Git-Tag: 1.7.8~42^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=529f6147b59baa0421391e35ad2f0fba1a2dc46b;p=rspamd.git Fix redis read_only was incorrectly set to true. We should use local variables in this check because result['xxx'] are assigned later. --- 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