diff --git a/AsyncClient.php b/AsyncClient.php index 954f1ed..c79eb5e 100644 --- a/AsyncClient.php +++ b/AsyncClient.php @@ -172,7 +172,7 @@ class AsyncClient extends ClientAbstracts */ public function close(): void { - if (!$this->client->connected) { + if (!$this->client || !$this->client->connected) { return; } $this->client->close();