Unlock wxWebSessionCURL mutex before destroying it

Mutexes must not be destroyed while locked and thread sanitizer
correctly complains about this, so ensure that we do unlock the mutex
before the worked thread terminates and the object is destroyed.
This commit is contained in:
Vadim Zeitlin
2021-01-10 21:23:48 +01:00
parent d88762d2f1
commit 29a36ef4ff

View File

@@ -439,7 +439,8 @@ static CURLMcode wx_curl_multi_wait(CURLM *multi_handle, int timeout_ms,
wxThread::ExitCode wxWebSessionCURL::Entry()
{
m_mutex.Lock();
// This mutex will be unlocked only while we're waiting on the condition.
wxMutexLocker lock(m_mutex);
int activeRequests = -1;
int repeats = 0;