def reloading_connection(&block)
      tries ||= config.retries
      result = block.call

    rescue Raidis::ConnectionError => exception
      # Try again a couple of times.
      throttle.sleep_if_needed
      if (tries -= 1) >= 0
        throttle.action!
        reconnect!
        retry
      end
      # Giving up.
      Raidis.unavailable!
      raise exception
    else
      # No exception was raised, reaffirming the availability.
      Raidis.available!
      result
    end
def reloading_connection(&block)
      tries ||= config.retries
      result = block.call

    rescue Raidis::ConnectionError => exception
      # Try again a couple of times.
      throttle.sleep_if_needed
      if (tries -= 1) >= 0
        throttle.action!
        reconnect!
        retry
      end
      # Giving up.
      Raidis.unavailable!
      raise exception
    else
      # No exception was raised, reaffirming the availability.
      Raidis.available!
      result
    end
Internal: If a Raidis::ConnectionError is detected during the execution of the block,
 try to reconnect to Redis and try again. Updates the availability state.

 Returns whatever the block returns.
 Raises Raidis::ConnectionError if the connection problem persists even after the retries.