fix(rediscluster): maybe too many connection when MOVED (#2016)

This commit is contained in:
sundream
2024-12-29 09:24:21 +08:00
committed by GitHub
parent 88df42a60f
commit 7c3942cdbd

View File

@@ -121,8 +121,8 @@ function rediscluster:initialize_slots_cache()
self:set_node_name(slave_node)
table.insert(master_node.slaves,slave_node)
end
table.insert(self.nodes,master_node)
for slot=tonumber(result[1]),tonumber(result[2]) do
table.insert(self.nodes,master_node)
self.slots[slot] = master_node
end
end