lib/cuboid/rpc/server/agent/node.rb in cuboid-0.2.6 vs lib/cuboid/rpc/server/agent/node.rb in cuboid-0.2.7
- old
+ new
@@ -74,11 +74,11 @@
def grid_member?
@peers.any?
end
def unplug
- @peers.each do |peer|
- connect_to_peer( peer ).remove_peer( @url ) {}
+ Raktr.global.create_iterator( @peers, 20 ).each do |peer, iterator|
+ connect_to_peer( peer ).remove_peer( @url ) { iterator.next }
end
@peers.clear
@dead_nodes.clear