From 753e521a412fee2ce2699217bb68b2ee196e90cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 10 Jan 2022 18:47:31 +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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AsyncClient.php b/AsyncClient.php index c79eb5e..bbcfefe 100644 --- a/AsyncClient.php +++ b/AsyncClient.php @@ -172,9 +172,11 @@ class AsyncClient extends ClientAbstracts */ public function close(): void { - if (!$this->client || !$this->client->connected) { + /** @var SwowClient $client */ + $client = $this->client; + if (!$client || !$client->isConnected()) { return; } - $this->client->close(); + $client->close(); } }