From fb52a24da365e3f3eead726e4784186d6440c481 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 24 May 2014 15:19:19 +0200 Subject: input/async: add offset/size comparison to IsEOF() --- src/input/AsyncInputStream.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx index 3f2d3b90f..169a9e8e4 100644 --- a/src/input/AsyncInputStream.cxx +++ b/src/input/AsyncInputStream.cxx @@ -89,7 +89,8 @@ AsyncInputStream::Check(Error &error) bool AsyncInputStream::IsEOF() { - return !open && buffer.IsEmpty(); + return (KnownSize() && offset >= size) || + (!open && buffer.IsEmpty()); } bool -- cgit v1.2.3