'error' => \
curl_error($easy->handle
),
'appconnect_time' => \
curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME
),
] + \
curl_getinfo($easy->handle
);
$ctx[self::CURL_VERSION_STR
] = \
curl_version()['version'
];
$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);
} private static function createRejection(EasyHandle
$easy, array
$ctx): PromiseInterface
{ static $connectionErrors =
[ \CURLE_OPERATION_TIMEOUTED => true,
\CURLE_COULDNT_RESOLVE_HOST => true,
\CURLE_COULDNT_CONNECT => true,
\CURLE_SSL_CONNECT_ERROR => true,
\CURLE_GOT_NOTHING => true,
];