From 61e8df913de7ad4e8d60804acc9efe6606be6b6b Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@gmail.com>
Date: Mon, 29 Jul 2024 23:04:59 +0200
Subject: [PATCH] input/thread: check IsEOF() in IsAvailable()

---
 src/input/ThreadInputStream.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/ThreadInputStream.cxx b/src/input/ThreadInputStream.cxx
index dbe3be20b..dc8fa10a0 100644
--- a/src/input/ThreadInputStream.cxx
+++ b/src/input/ThreadInputStream.cxx
@@ -111,7 +111,7 @@ ThreadInputStream::IsAvailable() const noexcept
 {
 	assert(!thread.IsInside());
 
-	return !buffer.empty() || eof || postponed_exception;
+	return !IsEOF() || postponed_exception;
 }
 
 inline size_t