]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Sort data received from Sentinel to avoid constant replacing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 4 Dec 2018 16:23:18 +0000 (16:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 4 Dec 2018 16:23:18 +0000 (16:23 +0000)
Issue: #2664
Closes: #2664
lualib/lua_redis.lua

index b246899db73faf2f36a9b4c5bef36c7dcd86b413..0c6520e5ce0682f65d04ca5b51ec2d66db39af4e 100644 (file)
@@ -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, ',')