Commit e0f777d4 authored by Max Kellermann's avatar Max Kellermann

output/alsa: move code to LockCaughtError()

parent febd1ad0
......@@ -300,6 +300,12 @@ private:
return !!error;
}
void LockCaughtError() noexcept {
const std::lock_guard<Mutex> lock(mutex);
error = std::current_exception();
cond.signal();
}
/* virtual methods from class MultiSocketMonitor */
std::chrono::steady_clock::duration PrepareSockets() noexcept override;
void DispatchSockets() noexcept override;
......@@ -865,10 +871,7 @@ try {
}
} catch (const std::runtime_error &) {
MultiSocketMonitor::Reset();
const std::lock_guard<Mutex> lock(mutex);
error = std::current_exception();
cond.signal();
LockCaughtError();
}
const struct AudioOutputPlugin alsa_output_plugin = {
......
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