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

Commit

Permalink
Fix refresh check of nodes down longer than the boundary.
Browse files Browse the repository at this point in the history
(Adrien Jarthon)

[ fix #128 ]
  • Loading branch information
durran committed Dec 21, 2012
1 parent ab03718 commit a0303a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,9 @@
* \#130 Flag down as down in refresh when not primary or secondary.
(Nilson Santos Figueiredo Jr)

* \#128 Fix refresh check to only check nodes that have been down longer
than the refresh boundary using the proper interval.

* \#124 Fix packing of bytes in core messages for big endian systems.

## 1.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/moped/cluster.rb
Expand Up @@ -127,7 +127,7 @@ def nodes(opts = {})
# 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.
Expand Down

0 comments on commit a0303a6

Please sign in to comment.