aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-04 16:23:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-04 16:23:18 +0000
commitb99cd00a121e1f80077144678207f21c82690544 (patch)
tree8d509ee01b24490d2b5e52a92c0910a2c40337c6 /lualib
parent390c2f4e28ce8a09b8e1dd01a4c2ce86c60db72f (diff)
downloadrspamd-b99cd00a121e1f80077144678207f21c82690544.tar.gz
rspamd-b99cd00a121e1f80077144678207f21c82690544.zip
[Fix] Sort data received from Sentinel to avoid constant replacing
Issue: #2664 Closes: #2664
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_redis.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua
index b246899db..0c6520e5c 100644
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@ -143,6 +143,9 @@ local function redis_query_sentinel(ev_base, params, initialised)
end
end
+ table.sort(read_servers_tbl)
+ table.sort(write_servers_tbl)
+
local read_servers_str = table.concat(read_servers_tbl, ',')
local write_servers_str = table.concat(write_servers_tbl, ',')