From bc049a3c77c3ee37458517f5d4bbd3cb26be306d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 11 Jan 2022 15:20:00 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- AsyncClient.php | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/AsyncClient.php b/AsyncClient.php index 06a18da..d55b509 100644 --- a/AsyncClient.php +++ b/AsyncClient.php @@ -115,7 +115,14 @@ class AsyncClient extends ClientAbstracts } } $this->client->send(implode("\r\n", $array) . "\r\n\r\n" . $content); - $receive = $this->waite($this->client); + $receive = ''; + while (true) { + $_tmp = $this->client->recv(); + if (empty($_tmp)) { + break; + } + $receive .= $_tmp; + } Kiri::getDi()->get(Logger::class)->debug($receive); @@ -130,24 +137,6 @@ class AsyncClient extends ClientAbstracts } - /** - * @param $client - * @return string - */ - private function waite($client): string - { - $receive = ''; - while (true) { - $_tmp = $client->recv(); - if (empty($_tmp)) { - break; - } - $receive .= $_tmp; - } - return $receive; - } - - private function chunked() {