def handle_response(r)
      return true if @done
      @raw_response = r
      res = result_from(r)
      if res.success?
        if @cancel_timer
          @cancel_timer.cancel
          @cancel_timer = nil
        end
        @done = true
        succeed(res.content)
      else
        reason = res.content
        if res.non_delivery?
          Log.info("Request non-delivery (#{reason}) for #{@operation}")
        elsif res.retry?
          reason = (reason && !reason.empty?) ? reason : "RightScale not ready"
          Log.info("Request #{@operation} failed (#{reason}) and should be retried")
        elsif res.cancel?
          reason = (reason && !reason.empty?) ? reason : "RightScale cannot execute request"
          Log.info("Request #{@operation} canceled (#{reason})")
        else
          Log.info("Request #{@operation} failed (#{reason})")
        end
        if (res.non_delivery? || res.retry? || @retry_on_error) && !res.cancel?
          Log.info("Retrying in #{@retry_delay} seconds...")
          if @retry_delay > 0
            this_delay = @retry_delay
            if (@retries += 1) >= @retry_delay_count
              @retry_delay = [@retry_delay * RETRY_BACKOFF_FACTOR, @max_retry_delay].min
              @retry_delay_count = [@retry_delay_count / RETRY_BACKOFF_FACTOR, 1].max
              @retries = 0
            end
            EM.add_timer(this_delay) { run }
          else
            EM.next_tick { run }
          end
        else
          cancel(res.content)
        end
      end
      true
    end
def handle_response(r)
      return true if @done
      @raw_response = r
      res = result_from(r)
      if res.success?
        if @cancel_timer
          @cancel_timer.cancel
          @cancel_timer = nil
        end
        @done = true
        succeed(res.content)
      else
        reason = res.content
        if res.non_delivery?
          Log.info("Request non-delivery (#{reason}) for #{@operation}")
        elsif res.retry?
          reason = (reason && !reason.empty?) ? reason : "RightScale not ready"
          Log.info("Request #{@operation} failed (#{reason}) and should be retried")
        elsif res.cancel?
          reason = (reason && !reason.empty?) ? reason : "RightScale cannot execute request"
          Log.info("Request #{@operation} canceled (#{reason})")
        else
          Log.info("Request #{@operation} failed (#{reason})")
        end
        if (res.non_delivery? || res.retry? || @retry_on_error) && !res.cancel?
          Log.info("Retrying in #{@retry_delay} seconds...")
          if @retry_delay > 0
            this_delay = @retry_delay
            if (@retries += 1) >= @retry_delay_count
              @retry_delay = [@retry_delay * RETRY_BACKOFF_FACTOR, @max_retry_delay].min
              @retry_delay_count = [@retry_delay_count / RETRY_BACKOFF_FACTOR, 1].max
              @retries = 0
            end
            EM.add_timer(this_delay) { run }
          else
            EM.next_tick { run }
          end
        else
          cancel(res.content)
        end
      end
      true
    end
Process request response and retry if needed

 === Parameters
 r(Result):: Request result

 === Return
 true:: Always return true