Skip to content

Commit

Permalink
Check socket is closed rather than PHP_EOL before return
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebeer committed May 29, 2020
1 parent 528d3eb commit 087fbaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BroadworksOCIP/Client/Transport/TCPTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public function getResponse($responseType = false, $outputType = ResponseOutput:
{
$this->response = '';
if ($this->pending) {
while (!strpos($this->response, PHP_EOL)) {
$this->response .= fgets($this->socket, 4096);
while (!feof($this->socket)) {
$this->response .= @fgets($this->socket, 4096);
}
$this->pending = false;
}
Expand Down

0 comments on commit 087fbaa

Please sign in to comment.