From ee71aabec11f428694c2712909716a09fbcc4859 Mon Sep 17 00:00:00 2001 From: Anson Qian Date: Thu, 13 Jun 2019 19:44:32 -0700 Subject: [PATCH] Fix indentation --- lib/synapse/service_watcher/zookeeper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/synapse/service_watcher/zookeeper.rb b/lib/synapse/service_watcher/zookeeper.rb index 9b468f26..08cc32b2 100644 --- a/lib/synapse/service_watcher/zookeeper.rb +++ b/lib/synapse/service_watcher/zookeeper.rb @@ -365,9 +365,9 @@ def zk_connect log.info "synapse: ZK client has reconnected #{@name}" # random backoff to avoid checking and refreshing all watchers at the same time sleep rand(10) - now = Time.now + now = Time.now # ensure there is only one refresh can happen within a time window - if !@last_reconnect_time.nil? && (now - @last_connect_time) < 60 + if !@last_reconnect_time.nil? && (now - @last_reconnect_time) < 60 log.info "synapse: ZK client skip since last reconnect is too close #{@name}" return end