From 6984f787461c36befdc5497d1149c577301b694e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 10 Jan 2022 18:44:20 +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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AsyncClient.php b/AsyncClient.php index 45d6bc9..954f1ed 100644 --- a/AsyncClient.php +++ b/AsyncClient.php @@ -10,8 +10,8 @@ declare(strict_types=1); namespace Kiri; use Exception; -use Kiri\Message\Stream; use Kiri\Abstracts\Logger; +use Kiri\Message\Stream; use Swoole\Client as SwowClient; /** @@ -172,6 +172,9 @@ class AsyncClient extends ClientAbstracts */ public function close(): void { + if (!$this->client->connected) { + return; + } $this->client->close(); } }