Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-10 18:48:17 +08:00
parent 753e521a41
commit 5b7a33f48b
+3 -3
View File
@@ -77,13 +77,13 @@ class AsyncClient extends ClientAbstracts
private function generate_client($data, $host, $isHttps, $path): void
{
$this->client = new SwowClient(SWOOLE_TCP, FALSE);
if ($isHttps || $this->isSSL()) {
$this->client->enableSSL();
}
$this->client->set(array_merge($this->settings(), ['open_http_protocol' => true]));
if (!$this->client->connect($host, $this->getPort())) {
throw new Exception('链接失败');
}
if ($isHttps || $this->isSSL()) {
$this->client->enableSSL();
}
if (!empty($this->getAgent())) {
$this->withAddedHeader('User-Agent', $this->getAgent());
}