Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
anson627 committed Jun 14, 2019
1 parent e59674a commit ee71aab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/synapse/service_watcher/zookeeper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee71aab

Please sign in to comment.