Commit 5e266cd8 authored by Max Kellermann's avatar Max Kellermann

Merge branch 'v0.21.x'

parents a199f58d ca5a400d
...@@ -48,6 +48,9 @@ BufferingInputStream::~BufferingInputStream() noexcept ...@@ -48,6 +48,9 @@ BufferingInputStream::~BufferingInputStream() noexcept
void void
BufferingInputStream::Check() BufferingInputStream::Check()
{ {
if (read_error)
std::rethrow_exception(read_error);
if (input) if (input)
input->Check(); input->Check();
} }
...@@ -165,6 +168,8 @@ BufferingInputStream::RunThread() noexcept ...@@ -165,6 +168,8 @@ BufferingInputStream::RunThread() noexcept
own InputStream interface) is in own InputStream interface) is in
"read" mode */ "read" mode */
read_error = std::current_exception(); read_error = std::current_exception();
client_cond.notify_one();
OnBufferAvailable();
} }
} else if (!idle && !read_error && } else if (!idle && !read_error &&
input->IsAvailable() && !input->IsEOF()) { input->IsAvailable() && !input->IsEOF()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment