private static function CurlFactory::finishError in Lockr 7.3
1 call to CurlFactory::finishError()
- CurlFactory::finish in vendor/
guzzlehttp/ guzzle/ src/ Handler/ CurlFactory.php - Completes a cURL transaction, either returning a response promise or a rejected promise.
File
- vendor/
guzzlehttp/ guzzle/ src/ Handler/ CurlFactory.php, line 130
Class
- CurlFactory
- Creates curl resources from a request
Namespace
GuzzleHttp\HandlerCode
private static function finishError(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory) {
// Get error information and release the handle to the factory.
$ctx = [
'errno' => $easy->errno,
'error' => curl_error($easy->handle),
] + curl_getinfo($easy->handle);
$factory
->release($easy);
// Retry when nothing is present or when curl failed to rewind.
if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) {
return self::retryFailedRewind($handler, $easy, $ctx);
}
return self::createRejection($easy, $ctx);
}