summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerassetstorage.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2020-08-14 16:28:25 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2020-08-14 16:28:25 +0100
commit7e37263fc5cb93e31727b2e3243f2221ed1f8cad (patch)
tree6e4f0fe5eb054bda8041fa894063b7987cb8af7c /indra/newview/llviewerassetstorage.cpp
parentd760f693ca3a01946380e7d5d352c18eabf4c055 (diff)
parent89cde15fb8c52071805af78e61848e743f2ab2f1 (diff)
Merge remote-tracking branch 'origin/master' into SL-12995
Diffstat (limited to 'indra/newview/llviewerassetstorage.cpp')
-rw-r--r--indra/newview/llviewerassetstorage.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index e0b64403ef..b295fa2977 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -49,6 +49,8 @@
/// LLViewerAssetRequest
///----------------------------------------------------------------------------
+static const std::string VIEWER_ASSET_STORAGE_CORO_POOL = "VAssetStorage";
+
/**
* @brief Local class to encapsulate asset fetch requests with a timestamp.
*
@@ -127,6 +129,15 @@ LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *
{
}
+LLViewerAssetStorage::~LLViewerAssetStorage()
+{
+ if (!LLCoprocedureManager::wasDeleted())
+ {
+ // This class has dedicated coroutine pool, clean it up, otherwise coroutines will crash later.
+ LLCoprocedureManager::instance().close(VIEWER_ASSET_STORAGE_CORO_POOL);
+ }
+}
+
// virtual
void LLViewerAssetStorage::storeAssetData(
const LLTransactionID& tid,
@@ -399,7 +410,7 @@ void LLViewerAssetStorage::queueRequestHttp(
bool is_temp = false;
LLViewerAssetStatsFF::record_enqueue(atype, with_http, is_temp);
- LLCoprocedureManager::instance().enqueueCoprocedure("AssetStorage","LLViewerAssetStorage::assetRequestCoro",
+ LLCoprocedureManager::instance().enqueueCoprocedure(VIEWER_ASSET_STORAGE_CORO_POOL,"LLViewerAssetStorage::assetRequestCoro",
boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, req, uuid, atype, callback, user_data));
}
}