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 data) void CurlInputStream::OnEnd() { + const std::lock_guard protect(mutex); cond.broadcast(); AsyncInputStream::SetClosed(); @@ -274,6 +275,7 @@ CurlInputStream::OnEnd() void CurlInputStream::OnError(std::exception_ptr e) { + const std::lock_guard protect(mutex); postponed_exception = std::move(e); if (IsSeekPending())