Browse files

only assert if we are still running

  • Loading branch information...
1 parent 71ddec6 commit defd4015ac31a88f2e460a3a3c29b118737af118 @ryanlecompte committed Aug 31, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/redis_failover/node_manager.rb
View
4 lib/redis_failover/node_manager.rb
@@ -111,12 +111,10 @@ def setup_zk
# Handles periodic state reports from {RedisFailover::NodeWatcher} instances.
def handle_state_reports
while running? && (state_report = @queue.pop)
- # Ensure that we still have the master lock.
- @zk_lock.assert!
-
begin
@mutex.synchronize do
return unless running?
+ @zk_lock.assert!
node, state = state_report
case state
when :unavailable then handle_unavailable(node)

0 comments on commit defd401

Please sign in to comment.