Skip to content

Commit

Permalink
Don't connect to failed replica nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaskins committed May 6, 2023
1 parent 2e15ca5 commit 5345df3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cluster.cr
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ module Redis
end

@read_nodes.each_value do |node|
node.replica_of = @write_nodes[replica_map[node.id]]
unless node.flags.fail?
node.replica_of = @write_nodes[replica_map[node.id]]
end
end

@write_pools = @write_nodes.map do |_id, node|
Expand Down

0 comments on commit 5345df3

Please sign in to comment.