diff options
Diffstat (limited to 'indra/llcorehttp')
| -rw-r--r-- | indra/llcorehttp/_httpreplyqueue.cpp | 1 | ||||
| -rw-r--r-- | indra/llcorehttp/_httpreplyqueue.h | 1 | ||||
| -rw-r--r-- | indra/llcorehttp/_httprequestqueue.cpp | 12 | ||||
| -rw-r--r-- | indra/llcorehttp/_httprequestqueue.h | 2 | ||||
| -rw-r--r-- | indra/llcorehttp/_httpservice.cpp | 6 | 
5 files changed, 15 insertions, 7 deletions
| diff --git a/indra/llcorehttp/_httpreplyqueue.cpp b/indra/llcorehttp/_httpreplyqueue.cpp index 2b138f3ad5..229bfdbe07 100644 --- a/indra/llcorehttp/_httpreplyqueue.cpp +++ b/indra/llcorehttp/_httpreplyqueue.cpp @@ -56,7 +56,6 @@ void HttpReplyQueue::addOp(const HttpReplyQueue::opPtr_t &op)  		mQueue.push_back(op);  	} -	mQueueCV.notify_all();  } diff --git a/indra/llcorehttp/_httpreplyqueue.h b/indra/llcorehttp/_httpreplyqueue.h index 928ee10a83..33e205c1c9 100644 --- a/indra/llcorehttp/_httpreplyqueue.h +++ b/indra/llcorehttp/_httpreplyqueue.h @@ -98,7 +98,6 @@ protected:  	OpContainer							mQueue;  	LLCoreInt::HttpMutex				mQueueMutex; -	LLCoreInt::HttpConditionVariable	mQueueCV;  }; // end class HttpReplyQueue diff --git a/indra/llcorehttp/_httprequestqueue.cpp b/indra/llcorehttp/_httprequestqueue.cpp index c6f4ad789f..ad72bdcce6 100644 --- a/indra/llcorehttp/_httprequestqueue.cpp +++ b/indra/llcorehttp/_httprequestqueue.cpp @@ -142,13 +142,19 @@ void HttpRequestQueue::wakeAll()  } -void HttpRequestQueue::stopQueue() +bool HttpRequestQueue::stopQueue()  {  	{  		HttpScopedLock lock(mQueueMutex); -		mQueueStopped = true; -		wakeAll(); +        if (!mQueueStopped) +        { +            mQueueStopped = true; +            wakeAll(); +            return true; +        } +        wakeAll(); +        return false;  	}  } diff --git a/indra/llcorehttp/_httprequestqueue.h b/indra/llcorehttp/_httprequestqueue.h index 3c3d134b07..f0296f30e3 100644 --- a/indra/llcorehttp/_httprequestqueue.h +++ b/indra/llcorehttp/_httprequestqueue.h @@ -124,7 +124,7 @@ public:  	/// them on their way.  	///  	/// Threading:  callable by any thread. -	void stopQueue(); +	bool stopQueue();  protected:  	static HttpRequestQueue *			sInstance; diff --git a/indra/llcorehttp/_httpservice.cpp b/indra/llcorehttp/_httpservice.cpp index 34268d94f6..56f52f1b09 100644 --- a/indra/llcorehttp/_httpservice.cpp +++ b/indra/llcorehttp/_httpservice.cpp @@ -87,7 +87,11 @@ HttpService::~HttpService()  		// is a bit tricky.  		if (mRequestQueue)  		{ -			mRequestQueue->stopQueue(); +            if (mRequestQueue->stopQueue()) +            { +                // Give mRequestQueue a chance to finish +                ms_sleep(10); +            }  		}  		if (mThread) | 
