input/async: use IsEOF() instead of !open for "ready" check
Checking "!open" did not work with the NFS plugin because that plugin does not close the file automatically, unlike CURL.
This commit is contained in:
parent
a877926f08
commit
d5fa2af353
@ -175,7 +175,8 @@ AsyncInputStream::ReadTag()
|
||||
bool
|
||||
AsyncInputStream::IsAvailable()
|
||||
{
|
||||
return postponed_error.IsDefined() || !open ||
|
||||
return postponed_error.IsDefined() ||
|
||||
IsEOF() ||
|
||||
!buffer.IsEmpty();
|
||||
}
|
||||
|
||||
@ -191,7 +192,7 @@ AsyncInputStream::Read(void *ptr, size_t read_size, Error &error)
|
||||
return 0;
|
||||
|
||||
r = buffer.Read();
|
||||
if (!r.IsEmpty() || !open)
|
||||
if (!r.IsEmpty() || IsEOF())
|
||||
break;
|
||||
|
||||
cond.wait(mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user