Fix crash in LLTextureFetch::getWorker upon viewer exit.
This is now necessary since the curl thread no longer syncs with the main thread: it is possible that a request finishes after a texture fetch thread was shot down but before curl was stopped, and curl calling BufferedCurlEasyRequest::processOutput while objects that the responder uses were already destructed (most notably LLTextureFetch itself).
This commit is contained in:
@@ -408,6 +408,16 @@ void initCurl(void)
|
||||
}
|
||||
}
|
||||
|
||||
// MAIN-THREAD
|
||||
void shutdownCurl(void)
|
||||
{
|
||||
using namespace AICurlPrivate;
|
||||
|
||||
DoutEntering(dc::curl, "AICurlInterface::shutdownCurl()");
|
||||
|
||||
BufferedCurlEasyRequest::shutdown();
|
||||
}
|
||||
|
||||
// MAIN-THREAD
|
||||
void cleanupCurl(void)
|
||||
{
|
||||
@@ -1293,6 +1303,8 @@ bool CurlEasyRequest::removeFromPerHostQueue(AICurlEasyRequest const& easy_reque
|
||||
static int const HTTP_REDIRECTS_DEFAULT = 10;
|
||||
|
||||
LLChannelDescriptors const BufferedCurlEasyRequest::sChannels;
|
||||
LLMutex BufferedCurlEasyRequest::sResponderCallbackMutex;
|
||||
bool BufferedCurlEasyRequest::sShuttingDown = false;
|
||||
|
||||
BufferedCurlEasyRequest::BufferedCurlEasyRequest() : mRequestTransferedBytes(0), mResponseTransferedBytes(0), mBufferEventsTarget(NULL), mStatus(HTTP_INTERNAL_ERROR_OTHER)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user