Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff
File: HttpBackoffStrategy.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Guzzle\Plugin\Backoff;
[2] Fix | Delete
[3] Fix | Delete
use Guzzle\Http\Message\RequestInterface;
[4] Fix | Delete
use Guzzle\Http\Message\Response;
[5] Fix | Delete
use Guzzle\Http\Exception\HttpException;
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* Strategy used to retry HTTP requests based on the response code.
[9] Fix | Delete
*
[10] Fix | Delete
* Retries 500 and 503 error by default.
[11] Fix | Delete
*/
[12] Fix | Delete
class HttpBackoffStrategy extends AbstractErrorCodeBackoffStrategy
[13] Fix | Delete
{
[14] Fix | Delete
/** @var array Default cURL errors to retry */
[15] Fix | Delete
protected static $defaultErrorCodes = array(500, 503);
[16] Fix | Delete
[17] Fix | Delete
protected function getDelay($retries, RequestInterface $request, Response $response = null, HttpException $e = null)
[18] Fix | Delete
{
[19] Fix | Delete
if ($response) {
[20] Fix | Delete
//Short circuit the rest of the checks if it was successful
[21] Fix | Delete
if ($response->isSuccessful()) {
[22] Fix | Delete
return false;
[23] Fix | Delete
} else {
[24] Fix | Delete
return isset($this->errorCodes[$response->getStatusCode()]) ? true : null;
[25] Fix | Delete
}
[26] Fix | Delete
}
[27] Fix | Delete
}
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function