Class CurlBackoffStrategy
Strategy used to retry when certain cURL error codes are encountered.
-
Guzzle\Plugin\Backoff\AbstractBackoffStrategy
implements
Guzzle\Plugin\Backoff\BackoffStrategyInterface
-
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
-
Guzzle\Plugin\Backoff\CurlBackoffStrategy
Methods summary
protected
boolean|integer|null
|
#
getDelay( integer $retries, Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response = null, Guzzle\Http\Exception\HttpException $e = null )
Implement the concrete strategy
Implement the concrete strategy
Parameters
- $retries
- Number of retries of the request
- $request
- Request that was sent
- $response
- Response that was received. Note that there may not be a response
- $e
- Exception that was encountered if any
Returns
boolean|integer|null Returns false to not retry or the number of seconds to delay between retries. Return true
or null to defer to the next strategy if available, and if not, return 0.
|
Properties summary
protected static
array
|
$defaultErrorCodes
Default cURL errors to retry
Default cURL errors to retry
|
#
array(
CURLE_COULDNT_RESOLVE_HOST, CURLE_COULDNT_CONNECT, CURLE_PARTIAL_FILE, CURLE_WRITE_ERROR, CURLE_READ_ERROR,
CURLE_OPERATION_TIMEOUTED, CURLE_SSL_CONNECT_ERROR, CURLE_HTTP_PORT_FAILED, CURLE_GOT_NOTHING,
CURLE_SEND_ERROR, CURLE_RECV_ERROR
)
|