summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-26 20:00:18 +0100
committerMax Kellermann <max@musicpd.org>2017-12-26 20:01:13 +0100
commiteee10ad2ed14bac7675147bac79c3ba9a2b6d582 (patch)
tree332993fd1a321fdb18b7ec29a2a6e80b46369fef
parent98472a81047c0280c760291f6839cff9bb0743b6 (diff)
input/curl: add missing mutex locks to OnEnd(), OnError()
-rw-r--r--src/input/plugins/CurlInputPlugin.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx
index 5cc29a539..7547b97f4 100644
--- a/src/input/plugins/CurlInputPlugin.cxx
+++ b/src/input/plugins/CurlInputPlugin.cxx
@@ -266,6 +266,7 @@ CurlInputStream::OnData(ConstBuffer<void> data)
void
CurlInputStream::OnEnd()
{
+ const std::lock_guard<Mutex> protect(mutex);
cond.broadcast();
AsyncInputStream::SetClosed();
@@ -274,6 +275,7 @@ CurlInputStream::OnEnd()
void
CurlInputStream::OnError(std::exception_ptr e)
{
+ const std::lock_guard<Mutex> protect(mutex);
postponed_exception = std::move(e);
if (IsSeekPending())