diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-07-30 21:07:35 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-07-30 21:07:35 +0300 | 
| commit | 135a85ec62d1bf437ec2d6f485e33e9ceb0c71ab (patch) | |
| tree | 28bc20511004a478482fa4f898bf547dada283c8 /indra | |
| parent | 8103d13047da4d196c7542843807a25098f1ecda (diff) | |
SL-13626 Fix asset storage coroutine shutdown
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llviewerassetstorage.cpp | 13 | ||||
| -rw-r--r-- | indra/newview/llviewerassetstorage.h | 2 | 
2 files changed, 14 insertions, 1 deletions
| diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index e0b64403ef..22269a9208 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -49,6 +49,8 @@  /// LLViewerAssetRequest  ///---------------------------------------------------------------------------- +static const std::string VIEWER_ASSET_STROTRAGE_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_STROTRAGE_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_STROTRAGE_CORO_POOL,"LLViewerAssetStorage::assetRequestCoro",              boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, req, uuid, atype, callback, user_data));      }  } diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index cefe215431..ef01d179b7 100644 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -43,6 +43,8 @@ public:  	LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,  				   LLVFS *vfs, LLVFS *static_vfs); +	~LLViewerAssetStorage(); +  	virtual void storeAssetData(  		const LLTransactionID& tid,  		LLAssetType::EType atype, | 
