summaryrefslogtreecommitdiff
path: root/indra/llmessage/llexperiencecache.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-09-23 01:48:27 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-09-23 01:48:27 +0300
commit966f1ac84eeddb30d63b6487e96f5266cdc939b1 (patch)
tree0d59d5aad6d3024e451226019fa5d6258b1ef7ec /indra/llmessage/llexperiencecache.cpp
parentb3b33a03c41cf3e26c080adb9c6cbefb32c1c4de (diff)
parent60ed688026269568a9eef67437dc780f88c92871 (diff)
Merge branch 'master' into DRTVWR-486
Diffstat (limited to 'indra/llmessage/llexperiencecache.cpp')
-rw-r--r--indra/llmessage/llexperiencecache.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp
index 7d96ac4b02..64c01bd9eb 100644
--- a/indra/llmessage/llexperiencecache.cpp
+++ b/indra/llmessage/llexperiencecache.cpp
@@ -85,15 +85,15 @@ const F64 LLExperienceCache::DEFAULT_EXPIRATION = 600.0;
const S32 LLExperienceCache::DEFAULT_QUOTA = 128; // this is megabytes
const int LLExperienceCache::SEARCH_PAGE_SIZE = 30;
+bool LLExperienceCache::sShutdown = false;
+
//=========================================================================
-LLExperienceCache::LLExperienceCache():
- mShutdown(false)
+LLExperienceCache::LLExperienceCache()
{
}
LLExperienceCache::~LLExperienceCache()
{
-
}
void LLExperienceCache::initSingleton()
@@ -122,7 +122,7 @@ void LLExperienceCache::cleanup()
{
cache_stream << (*this);
}
- mShutdown = true;
+ sShutdown = true;
}
//-------------------------------------------------------------------------
@@ -344,7 +344,7 @@ void LLExperienceCache::requestExperiences()
ostr << urlBase << "?page_size=" << PAGE_SIZE1;
RequestQueue_t requests;
- while (!mRequestQueue.empty())
+ while (!mRequestQueue.empty() && !sShutdown)
{
RequestQueue_t::iterator it = mRequestQueue.begin();
LLUUID key = (*it);
@@ -398,8 +398,6 @@ void LLExperienceCache::idleCoro()
LL_INFOS("ExperienceCache") << "Launching Experience cache idle coro." << LL_ENDL;
do
{
- llcoro::suspendUntilTimeout(SECS_BETWEEN_REQUESTS);
-
if (mEraseExpiredTimer.checkExpirationAndReset(ERASE_EXPIRED_TIMEOUT))
{
eraseExpired();
@@ -410,7 +408,9 @@ void LLExperienceCache::idleCoro()
requestExperiences();
}
- } while (!mShutdown);
+ llcoro::suspendUntilTimeout(SECS_BETWEEN_REQUESTS);
+
+ } while (!sShutdown);
// The coroutine system will likely be shut down by the time we get to this point
// (or at least no further cycling will occur on it since the user has decided to quit.)