def reconnect
      unless @reconnecting
        @reconnecting = true
        @stats["reconnects"].update("initiate")
        @reconnect_timer = EM_S::PeriodicTimer.new(rand(HEALTH_CHECK_INTERVAL)) do
          begin
            @http_client.check_health
            @stats["reconnects"].update("success")
            @reconnect_timer.cancel if @reconnect_timer # only need 'if' for test purposes
            @reconnect_timer = @reconnecting = nil
            renew_authorization(0)
          rescue BalancedHttpClient::NotResponding => e
            @stats["reconnects"].update("no response")
          rescue Exception => e
            ErrorTracker.log(self, "Failed authorization reconnect", e)
            @stats["reconnects"].update("failure")
          end
          @reconnect_timer.interval = HEALTH_CHECK_INTERVAL if @reconnect_timer
        end
      end
      true
    end
def reconnect
      unless @reconnecting
        @reconnecting = true
        @stats["reconnects"].update("initiate")
        @reconnect_timer = EM_S::PeriodicTimer.new(rand(HEALTH_CHECK_INTERVAL)) do
          begin
            @http_client.check_health
            @stats["reconnects"].update("success")
            @reconnect_timer.cancel if @reconnect_timer # only need 'if' for test purposes
            @reconnect_timer = @reconnecting = nil
            renew_authorization(0)
          rescue BalancedHttpClient::NotResponding => e
            @stats["reconnects"].update("no response")
          rescue Exception => e
            ErrorTracker.log(self, "Failed authorization reconnect", e)
            @stats["reconnects"].update("failure")
          end
          @reconnect_timer.interval = HEALTH_CHECK_INTERVAL if @reconnect_timer
        end
      end
      true
    end
Reconnect with authorization server by periodically checking health
 Delay random interval before starting to check to reduce server spiking
 When again healthy, renew authorization

 @return [TrueClass] always true