input/curl: add missing mutex locks to OnEnd(), OnError()

This commit is contained in:
Max Kellermann 2017-12-26 20:00:18 +01:00
parent 98472a8104
commit eee10ad2ed

View File

@ -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())