diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index b38fd36c0..2f51ef8d5 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -762,12 +762,19 @@ AlsaOutput::Drain() { const std::lock_guard lock(mutex); + if (error) + std::rethrow_exception(error); + drain = true; UnlockActivate(); - while (drain && !error) + while (drain) { + if (error) + std::rethrow_exception(error); + cond.wait(mutex); + } } inline void