diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2012-01-25 16:30:02 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2012-01-25 16:30:02 -0700 |
commit | cc3f90a888ad45a01c0d696b7cf178f5516cfb8f (patch) | |
tree | 6a7e28cd2518737b15ab2cd160640a64d28ab571 /indra | |
parent | 361efbc07e83ec79a19d96b34aa1913dce1d0e1d (diff) | |
parent | 1316f3313066beef74729c2be5a8d142d185161d (diff) |
Automated merge with https://bitbucket.org/VirLinden/vir-project-3
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmessage/llcurl.cpp | 11 | ||||
-rw-r--r-- | indra/llmessage/llcurl.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 1ab82a273b..32a9cd061f 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -91,6 +91,7 @@ std::string LLCurl::sCAFile; LLCurlThread* LLCurl::sCurlThread = NULL ; LLMutex* LLCurl::sHandleMutexp = NULL ; S32 LLCurl::sTotalHandles = 0 ; +bool LLCurl::sNotQuitting = true; void check_curl_code(CURLcode code) { @@ -319,6 +320,14 @@ LLCurl::Easy::~Easy() --gCurlEasyCount; curl_slist_free_all(mHeaders); for_each(mStrings.begin(), mStrings.end(), DeletePointerArray()); + + if (mResponder && LLCurl::sNotQuitting) //aborted + { + std::string reason("Request timeout, aborted.") ; + mResponder->completedRaw(408, //HTTP_REQUEST_TIME_OUT, timeout, abort + reason, mChannels, mOutput); + } + mResponder = NULL; } void LLCurl::Easy::resetState() @@ -1462,6 +1471,8 @@ void LLCurl::initClass(bool multi_threaded) void LLCurl::cleanupClass() { + sNotQuitting = false; //set quitting + //shut down curl thread while(1) { diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index 2b23ac9763..7d2340a6cb 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -197,6 +197,8 @@ private: static LLMutex* sHandleMutexp ; static S32 sTotalHandles ; +public: + static bool sNotQuitting; }; class LLCurl::Easy |