private function onSocketResolve(RequestCycle $cycle, $error, $socket)
{
if ($error) {
$this->fail($cycle, $error);
return;
}
$cycle->socket = $socket;
$cycle->socketProcuredAt = microtime(true);
$cycle->futureResponse->update([Notify::SOCK_PROCURED, null]);
if ($cycle->uri->getScheme() === 'https') {
$this->enableCrypto($cycle);
} else {
$this->onCryptoCompletion($cycle);
}
}