From b87cf1ad48c9c04bb3c49c060fda7a7217108984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Kep=C3=A1k?= Date: Mon, 8 Aug 2022 20:41:29 +0200 Subject: [PATCH] Fixed wrong condition --- src/Connection/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Connection/Client.php b/src/Connection/Client.php index 507e0b4..2dfa9df 100644 --- a/src/Connection/Client.php +++ b/src/Connection/Client.php @@ -74,7 +74,7 @@ public function syncDisconnect(int $replyCode = 0, string $replyText = ""): bool protected function write(): void { - if ($this->stream && !@feof($this->stream)) { + if ($this->stream && feof($this->stream)) { $this->syncDisconnect(Constants::STATUS_RESOURCE_ERROR, "Connection closed by server unexpectedly"); throw new ClientException("Broken pipe or closed connection."); }