Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Fixed wrong condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bckp committed Aug 8, 2022
1 parent d3a218a commit b87cf1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Connection/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
Expand Down

0 comments on commit b87cf1a

Please sign in to comment.