Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-11 14:58:21 +08:00
parent 77f755d07c
commit 072de12cc1
+6 -1
View File
@@ -77,7 +77,12 @@ class AsyncClient extends ClientAbstracts
private function generate_client($data, $host, $isHttps, $path): void
{
$this->client = new SwowClient(SWOOLE_TCP, FALSE);
$this->client->set(array_merge($this->settings(), ['open_http_protocol' => true]));
$this->client->set(array_merge($this->settings(), [
'open_http_protocol' => true,
'open_eof_check' => true,
'package_eof' => "\r\n\r\n",
'package_max_length' => 1024 * 1024 * 2,
]));
if (!$this->client->connect($host, $this->getPort())) {
throw new Exception('链接失败');
}