diff options
-rw-r--r-- | stream/stream_file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c index dfafb773f0..20d2a85497 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -55,6 +55,8 @@ static const struct m_struct_st stream_opts = { static int fill_buffer(stream_t *s, char* buffer, int max_len){ int r = read(s->fd,buffer,max_len); + // We are certain this is EOF, do not retry + if (max_len && r == 0) s->eof = 1; return (r <= 0) ? -1 : r; } |