diff options
-rwxr-xr-x | main/streams.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/streams.c b/main/streams.c index 4792fc3fb0..a1fa323df4 100755 --- a/main/streams.c +++ b/main/streams.c @@ -521,8 +521,7 @@ static void php_stream_fill_read_buffer(php_stream *stream, size_t size TSRMLS_D if (stream->writepos - stream->readpos < (off_t)size) { size_t justread = 0; - if (stream->eof) - return; + /* ignore eof here; the underlying state might have changed */ /* no; so lets fetch more data */ @@ -581,7 +580,8 @@ PHPAPI size_t _php_stream_read(php_stream *stream, char *buf, size_t size TSRMLS didread += toread; } - if (size == 0 || stream->eof) { + /* ignore eof here; the underlying state might have changed */ + if (size == 0) { break; } |