output/httpd: move Close() lock into the I/O thread
Fixes a potential deadlock introduced by commit 945287358b
This commit is contained in:
parent
26e4a40cc7
commit
f88f1fca3f
@ -266,14 +266,13 @@ HttpdOutput::Open(AudioFormat &audio_format)
|
||||
inline void
|
||||
HttpdOutput::Close()
|
||||
{
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
|
||||
assert(open);
|
||||
open = false;
|
||||
|
||||
delete timer;
|
||||
|
||||
BlockingCall(GetEventLoop(), [this](){
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
open = false;
|
||||
clients.clear_and_dispose(DeleteDisposer());
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user