diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-11-01 20:08:25 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-11-01 20:50:13 +0000 |
commit | 0bffe57f784b40dc355c2eca82d1d7a8cab09093 (patch) | |
tree | 4fde86934f4ee863a972a1ee1c52a7f59801bac5 | |
parent | 6897db699255ce1fbd31ffb304db357351f5509a (diff) | |
download | mogilefs-client-0bffe57f784b40dc355c2eca82d1d7a8cab09093.tar.gz |
This is easier-to-read and more correct. This is not available in 1.8.6, but we already broke 1.8.6 compatibility with String#bytesize.
-rw-r--r-- | lib/mogilefs/backend.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mogilefs/backend.rb b/lib/mogilefs/backend.rb index 0ab2d4a..973d82b 100644 --- a/lib/mogilefs/backend.rb +++ b/lib/mogilefs/backend.rb @@ -221,7 +221,7 @@ class MogileFS::Backend now = Time.now - @hosts.sort_by { rand(3) - 1 }.each do |host| + @hosts.shuffle.each do |host| next if @dead.include? host and @dead[host] > now - 5 begin |