Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Merge 9ac3813 into cf817ca
Browse files Browse the repository at this point in the history
  • Loading branch information
sunilkumarn committed Apr 27, 2016
2 parents cf817ca + 9ac3813 commit f9e33e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/moped/read_preference/nearest.rb
Expand Up @@ -42,7 +42,7 @@ def name
# @since 2.0.0
def with_node(cluster, &block)
with_retry(cluster) do
nearest = cluster.nodes.sort_by(&:latency).first
nearest = cluster.nodes.select(&:latency).sort_by(&:latency).first
if nearest
block.call(nearest)
else
Expand Down

0 comments on commit f9e33e2

Please sign in to comment.