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

Commit

Permalink
Improved handling of strange cases with fgets() returning after await
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Jun 20, 2018
1 parent b8ac104 commit 158dc51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FileHandleInput.hh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ final class FileHandleInput implements InputInterface {
$impl = () ==> \fgets($this->f, $max_bytes + 1);
}
$data = $impl();
if ($data === false) {
while ($data === false && !$this->isEof()) {
await $this->waitForDataAsync();
$data = $impl();
}
Expand Down

0 comments on commit 158dc51

Please sign in to comment.