Commits

BaoLinden committed eb0e557 Merge
  • Participants
  • Parent commits dfe0be1, 81fada0

Comments (0)

Files changed (2)

File indra/llmessage/llcurl.cpp

 LLCurlThread* LLCurl::sCurlThread = NULL ;
 LLMutex* LLCurl::sHandleMutexp = NULL ;
 S32      LLCurl::sTotalHandles = 0 ;
+bool     LLCurl::sNotQuitting = true;
 
 void check_curl_code(CURLcode code)
 {
 	--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()
 
 void LLCurl::cleanupClass()
 {
+	sNotQuitting = false; //set quitting
+
 	//shut down curl thread
 	while(1)
 	{

File indra/llmessage/llcurl.h

 
 	static LLMutex* sHandleMutexp ;
 	static S32      sTotalHandles ;
+public:
+	static bool     sNotQuitting;
 };
 
 class LLCurl::Easy