simplify the while statement
This commit is contained in:
parent
bf8c6f8078
commit
7ab357380b
|
|
@ -86,7 +86,11 @@ class event_socket {
|
||||||
if (array_key_exists('Content-Length', $content)) {
|
if (array_key_exists('Content-Length', $content)) {
|
||||||
$str = $b->read_n($content['Content-Length']);
|
$str = $b->read_n($content['Content-Length']);
|
||||||
if ($str === false) {
|
if ($str === false) {
|
||||||
while (!feof($this->fp)) {
|
while (true) {
|
||||||
|
if (feof($this->fp)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$buffer = fgets($this->fp, 1024);
|
$buffer = fgets($this->fp, 1024);
|
||||||
$b->append($buffer);
|
$b->append($buffer);
|
||||||
$str = $b->read_n($content['Content-Length']);
|
$str = $b->read_n($content['Content-Length']);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue