diff --git a/src/Connection.php b/src/Connection.php index 199229e..7c71735 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -95,11 +95,7 @@ public function read(): Generator $outputFromSocket = socket_read($this->socket, $this->bufferSize); - if ($outputFromSocket === false) { - break; - } - - if ($outputFromSocket === '') { + if ($outputFromSocket === false || $outputFromSocket === ''){ break; } @@ -107,3 +103,4 @@ public function read(): Generator } } } +