input/curl: add missing mutex locks to OnEnd(), OnError()
This commit is contained in:
parent
98472a8104
commit
eee10ad2ed
@ -266,6 +266,7 @@ CurlInputStream::OnData(ConstBuffer<void> data)
|
|||||||
void
|
void
|
||||||
CurlInputStream::OnEnd()
|
CurlInputStream::OnEnd()
|
||||||
{
|
{
|
||||||
|
const std::lock_guard<Mutex> protect(mutex);
|
||||||
cond.broadcast();
|
cond.broadcast();
|
||||||
|
|
||||||
AsyncInputStream::SetClosed();
|
AsyncInputStream::SetClosed();
|
||||||
@ -274,6 +275,7 @@ CurlInputStream::OnEnd()
|
|||||||
void
|
void
|
||||||
CurlInputStream::OnError(std::exception_ptr e)
|
CurlInputStream::OnError(std::exception_ptr e)
|
||||||
{
|
{
|
||||||
|
const std::lock_guard<Mutex> protect(mutex);
|
||||||
postponed_exception = std::move(e);
|
postponed_exception = std::move(e);
|
||||||
|
|
||||||
if (IsSeekPending())
|
if (IsSeekPending())
|
||||||
|
Loading…
Reference in New Issue
Block a user