oss/libs/guzzle/plugin/Guzzle/Plugin/Backoff/BackoffPlugin.php
public function onRequestSent(Event $event)
    {
        $request = $event['request'];
        $response = $event['response'];
        $exception = $event['exception'];

        $params = $request->getParams();
        $retries = (int) $params->get(self::RETRY_PARAM);
        $delay = $this->strategy->getBackoffPeriod($retries, $request, $response, $exception);

        if ($delay !== false) {
            // Calculate how long to wait until the request should be retried
            $params->set(self::RETRY_PARAM, ++$retries)
                ->set(self::DELAY_PARAM, microtime(true) + $delay);
            // Send the request again
            $request->setState(RequestInterface::STATE_TRANSFER);
            $this->dispatch(self::RETRY_EVENT, array(
                'request'  => $request,
                'response' => $response,
                'handle'   => $exception ? $exception->getCurlHandle() : null,
                'retries'  => $retries,
                'delay'    => $delay
            ));
        }
    }
public function onRequestSent(Event $event)
    {
        $request = $event['request'];
        $response = $event['response'];
        $exception = $event['exception'];

        $params = $request->getParams();
        $retries = (int) $params->get(self::RETRY_PARAM);
        $delay = $this->strategy->getBackoffPeriod($retries, $request, $response, $exception);

        if ($delay !== false) {
            // Calculate how long to wait until the request should be retried
            $params->set(self::RETRY_PARAM, ++$retries)
                ->set(self::DELAY_PARAM, microtime(true) + $delay);
            // Send the request again
            $request->setState(RequestInterface::STATE_TRANSFER);
            $this->dispatch(self::RETRY_EVENT, array(
                'request'  => $request,
                'response' => $response,
                'handle'   => $exception ? $exception->getCurlHandle() : null,
                'retries'  => $retries,
                'delay'    => $delay
            ));
        }
    }
public function onRequestSent ( Event $ event ) { $ request = $ event [ 'request' ] ; $ response = $ event [ 'response' ] ; $ exception = $ event [ 'exception' ] ; $ params = $ request -> getParams ( ) ; $ retries = ( int ) $ params -> get ( self :: RETRY_PARAM ) ; $ delay = $ this -> strategy -> getBackoffPeriod ( $ retries , $ request , $ response , $ exception ) ; if ( $ delay !== false ) { // Calculate how long to wait until the request should be retried $ params -> set ( self :: RETRY_PARAM , ++ $ retries ) -> set ( self :: DELAY_PARAM , microtime ( true ) + $ delay ) ; // Send the request again $ request -> setState ( RequestInterface :: STATE_TRANSFER ) ; $ this -> dispatch ( self :: RETRY_EVENT , array ( 'request' => $ request , 'response' => $ response , 'handle' => $ exception ? $ exception -> getCurlHandle ( ) : null , 'retries' => $ retries , 'delay' => $ delay ) ) ; } }
Called when a request has been sent  and isn't finished processing

@param Event $event
Called when a request has been sent and isn t finished processing