Skip to content

Commit 851d881

Browse files
committed
Strips the escape chars at the end of fread
1 parent b0eac48 commit 851d881

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Connection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ private function receive($len = null)
177177
$line .= fread($this->streamSocket, $chunkSize);
178178
$receivedBytes += $chunkSize;
179179
}
180+
if (strlen($line) > 2) {
181+
$line = substr($line, 0, -2);
182+
}
180183
} else {
181184
$line = fgets($this->streamSocket);
182185
}

0 commit comments

Comments
 (0)