diff options
Diffstat (limited to 'lib/rinda/ring.rb')
-rw-r--r-- | lib/rinda/ring.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/rinda/ring.rb b/lib/rinda/ring.rb index 3ff4606e2a..8a2a201c8a 100644 --- a/lib/rinda/ring.rb +++ b/lib/rinda/ring.rb @@ -203,13 +203,17 @@ module Rinda queue.push(ts) end queue.push(nil) + end + + @primary = queue.pop + raise('RingNotFound') if @primary.nil? + + Thread.new do while it = queue.pop @rings.push(it) end end - @primary = queue.pop - raise('RingNotFound') if @primary.nil? @primary end |