diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index c732e3bc77999ad8b5b697aa30270a9e6ea8396a..b631b96252f0b6a1dea8db677c67a753f4c5ceed 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -195,7 +195,8 @@ class LL_COMMON_API LLMutex : public LLMutexBase } ~LLMutex() { - llassert(!isLocked()); // better not be locked! + //this assertion erroneously triggers whenever an LLCondition is destroyed + //llassert(!isLocked()); // better not be locked! apr_thread_mutex_destroy(mAPRMutexp); mAPRMutexp = NULL; } diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 14e169c6b1011a351d582a0ae8e9b131e2daaf19..280a8942a8bbe0a659a1811bc497d6196efa0407 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -222,7 +222,7 @@ namespace boost std::set<CURL*> LLCurl::Easy::sFreeHandles; std::set<CURL*> LLCurl::Easy::sActiveHandles; LLMutex* LLCurl::Easy::sHandleMutex = NULL; - +LLMutex* LLCurl::Easy::sMultiMutex = NULL; //static CURL* LLCurl::Easy::allocEasyHandle() @@ -606,6 +606,7 @@ void LLCurl::Multi::run() mPerformState = PERFORM_STATE_PERFORMING; if (!mQuitting) { + LLMutexLock lock(LLCurl::Easy::sMultiMutex); doPerform(); } } @@ -1179,6 +1180,7 @@ void LLCurl::initClass(bool multi_threaded) check_curl_code(code); Easy::sHandleMutex = new LLMutex(); + Easy::sMultiMutex = new LLMutex(); #if SAFE_SSL S32 mutex_count = CRYPTO_num_locks(); @@ -1200,6 +1202,8 @@ void LLCurl::cleanupClass() delete Easy::sHandleMutex; Easy::sHandleMutex = NULL; + delete Easy::sMultiMutex; + Easy::sMultiMutex = NULL; for (std::set<CURL*>::iterator iter = Easy::sFreeHandles.begin(); iter != Easy::sFreeHandles.end(); ++iter) { diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index 213b281e72de5f3602ecd83d01cb8d96b67ce88c..a876a1562e229eadf5289c208c49bb8dc16ef70c 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -251,6 +251,7 @@ class LLCurl::Easy static std::set<CURL*> sFreeHandles; static std::set<CURL*> sActiveHandles; static LLMutex* sHandleMutex; + static LLMutex* sMultiMutex; }; class LLCurl::Multi : public LLThread diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6ebb0162a471473e6033f069601b0b04c2e3fc7d..27598c9aac34767b2ad9441b45556998f04c25e6 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1858,7 +1858,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>Cursor3D</key> <map>