input/curl: relock mutex in error paths
This commit is contained in:
parent
5cec477131
commit
49695d47d3
@ -955,11 +955,14 @@ CurlInputStream::Seek(InputPlugin::offset_type new_offset, int whence,
|
|||||||
/* seek to EOF: simulate empty result; avoid
|
/* seek to EOF: simulate empty result; avoid
|
||||||
triggering a "416 Requested Range Not Satisfiable"
|
triggering a "416 Requested Range Not Satisfiable"
|
||||||
response */
|
response */
|
||||||
|
mutex.lock();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!InitEasy(error))
|
if (!InitEasy(error)) {
|
||||||
|
mutex.lock();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* send the "Range" header */
|
/* send the "Range" header */
|
||||||
|
|
||||||
@ -970,8 +973,10 @@ CurlInputStream::Seek(InputPlugin::offset_type new_offset, int whence,
|
|||||||
|
|
||||||
ready = false;
|
ready = false;
|
||||||
|
|
||||||
if (!input_curl_easy_add_indirect(this, error))
|
if (!input_curl_easy_add_indirect(this, error)) {
|
||||||
|
mutex.lock();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
WaitReady();
|
WaitReady();
|
||||||
|
Loading…
Reference in New Issue
Block a user