src/Guzzle/Plugin/Backoff/BackoffPlugin.php
public function onRequestPoll(Event $event)
    {
        $request = $event['request'];
        $delay = $request->getParams()->get(self::DELAY_PARAM);

        // If the duration of the delay has passed, retry the request using the pool
        if (null !== $delay && microtime(true) >= $delay) {
            // Remove the request from the pool and then add it back again. This is required for cURL to know that we
            // want to retry sending the easy handle.
            $request->getParams()->remove(self::DELAY_PARAM);
            // Rewind the request body if possible
            if ($request instanceof EntityEnclosingRequestInterface && $request->getBody()) {
                $request->getBody()->seek(0);
            }
            $multi = $event['curl_multi'];
            $multi->remove($request);
            $multi->add($request);
        }
    }
public function onRequestPoll(Event $event)
    {
        $request = $event['request'];
        $delay = $request->getParams()->get(self::DELAY_PARAM);

        // If the duration of the delay has passed, retry the request using the pool
        if (null !== $delay && microtime(true) >= $delay) {
            // Remove the request from the pool and then add it back again. This is required for cURL to know that we
            // want to retry sending the easy handle.
            $request->getParams()->remove(self::DELAY_PARAM);
            // Rewind the request body if possible
            if ($request instanceof EntityEnclosingRequestInterface && $request->getBody()) {
                $request->getBody()->seek(0);
            }
            $multi = $event['curl_multi'];
            $multi->remove($request);
            $multi->add($request);
        }
    }
public function onRequestPoll ( Event $ event ) { $ request = $ event [ 'request' ] ; $ delay = $ request -> getParams ( ) -> get ( self :: DELAY_PARAM ) ; // If the duration of the delay has passed, retry the request using the pool if ( null !== $ delay && microtime ( true ) >= $ delay ) { // Remove the request from the pool and then add it back again. This is required for cURL to know that we // want to retry sending the easy handle. $ request -> getParams ( ) -> remove ( self :: DELAY_PARAM ) ; // Rewind the request body if possible if ( $ request instanceof EntityEnclosingRequestInterface && $ request -> getBody ( ) ) { $ request -> getBody ( ) -> seek ( 0 ) ; } $ multi = $ event [ 'curl_multi' ] ; $ multi -> remove ( $ request ) ; $ multi -> add ( $ request ) ; } }
Called when a request is polling in the curl multi object

@param Event $event
Called when a request is polling in the curl multi object