lib/moped/cluster.rb in moped-1.3.1 vs lib/moped/cluster.rb in moped-1.3.2
- old
+ new
@@ -125,10 +125,10 @@
refresh_boundary = current_time - refresh_interval
# Find the nodes that were down but are ready to be refreshed, or those
# with stale connection information.
needs_refresh, available = @nodes.partition do |node|
- (node.down? && node.down_at < down_boundary) || node.needs_refresh?(refresh_boundary)
+ node.down? ? (node.down_at < down_boundary) : node.needs_refresh?(refresh_boundary)
end
# Refresh those nodes.
available.concat refresh(needs_refresh)