diff --git a/lib/synapse/service_watcher/zookeeper.rb b/lib/synapse/service_watcher/zookeeper.rb index 2f7b8025..00896181 100644 --- a/lib/synapse/service_watcher/zookeeper.rb +++ b/lib/synapse/service_watcher/zookeeper.rb @@ -84,8 +84,7 @@ def watch return if @zk.nil? log.debug "synapse: setting watch at #{@discovery['path']}" - @watcher.unsubscribe unless @watcher.nil? - @watcher = @zk.register(@discovery['path'], &watcher_callback) + @watcher = @zk.register(@discovery['path'], &watcher_callback) unless @watcher # Verify that we actually set up the watcher. unless @zk.exists?(@discovery['path'], :watch => true)