input/async: add offset/size comparison to IsEOF()

This commit is contained in:
Max Kellermann 2014-05-24 15:19:19 +02:00
parent fbafb19657
commit fb52a24da3

View File

@ -89,7 +89,8 @@ AsyncInputStream::Check(Error &error)
bool bool
AsyncInputStream::IsEOF() AsyncInputStream::IsEOF()
{ {
return !open && buffer.IsEmpty(); return (KnownSize() && offset >= size) ||
(!open && buffer.IsEmpty());
} }
bool bool