aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/input/AsyncInputStream.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx
index 43190f907..8942b5116 100644
--- a/src/input/AsyncInputStream.cxx
+++ b/src/input/AsyncInputStream.cxx
@@ -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);