aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-05 02:12:29 +0100
committerMax Kellermann <max@duempel.org>2014-01-05 02:13:35 +0100
commit4ddfc6e9a2930ede249556548bae370b68af0fbc (patch)
treedbb5dc9880c96ab7963cca87ba824be75d4f9f59
parentdcbc05a9cd46e135a4e8c17b26f5f8d5505477c7 (diff)
downloadmpd-4ddfc6e9a2930ede249556548bae370b68af0fbc.tar.gz
mpd-4ddfc6e9a2930ede249556548bae370b68af0fbc.tar.xz
mpd-4ddfc6e9a2930ede249556548bae370b68af0fbc.zip
output/httpd: move the clients.clear() call to the IOThread
This call is not thread-safe.
-rw-r--r--src/output/HttpdOutputPlugin.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/output/HttpdOutputPlugin.cxx b/src/output/HttpdOutputPlugin.cxx
index c403c97fb..4cd2b4ae8 100644
--- a/src/output/HttpdOutputPlugin.cxx
+++ b/src/output/HttpdOutputPlugin.cxx
@@ -347,7 +347,9 @@ HttpdOutput::Close()
delete timer;
- clients.clear();
+ BlockingCall(GetEventLoop(), [this](){
+ clients.clear();
+ });
if (header != nullptr)
header->Unref();