From 4ddfc6e9a2930ede249556548bae370b68af0fbc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 5 Jan 2014 02:12:29 +0100 Subject: [PATCH] output/httpd: move the clients.clear() call to the IOThread This call is not thread-safe. --- src/output/HttpdOutputPlugin.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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();