1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 18:13:00 +01:00

Merge pull request #451 from greg0ire/patch1

check exception class
This commit is contained in:
Michael Dowling 2013-10-29 10:16:50 -07:00
commit 0d9b3b0396

View File

@ -8,6 +8,7 @@ use Guzzle\Http\Message\EntityEnclosingRequestInterface;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Curl\CurlMultiInterface;
use Guzzle\Http\Exception\CurlException;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
@ -92,7 +93,7 @@ class BackoffPlugin extends AbstractHasDispatcher implements EventSubscriberInte
$this->dispatch(self::RETRY_EVENT, array(
'request' => $request,
'response' => $response,
'handle' => $exception ? $exception->getCurlHandle() : null,
'handle' => ($exception && $exception instanceof CurlException) ? $exception->getCurlHandle() : null,
'retries' => $retries,
'delay' => $delay
));