From 80fe2157fe43e46f16b33fc75ab8ef7de428d275 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Sat, 15 Aug 2020 12:36:27 +0300
Subject: [PATCH] SL-13783 Workaround for enqueueCoprocedure() crash with asset
 storage

---
 indra/llmessage/llcoproceduremanager.cpp | 6 ++++++
 indra/llmessage/llcoproceduremanager.h   | 1 +
 2 files changed, 7 insertions(+)

diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp
index 74cdff2b008..e1ca388dd7c 100644
--- a/indra/llmessage/llcoproceduremanager.cpp
+++ b/indra/llmessage/llcoproceduremanager.cpp
@@ -137,6 +137,12 @@ LLCoprocedureManager::~LLCoprocedureManager()
 
 }
 
+void LLCoprocedureManager::initSingleton()
+{
+    // workaround until we get mutex into initializePool
+    initializePool("VAssetStorage");
+}
+
 LLCoprocedureManager::poolPtr_t LLCoprocedureManager::initializePool(const std::string &poolName)
 {
     // Attempt to look up a pool size in the configuration.  If found use that
diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h
index 7d0e83180ce..f323b168789 100644
--- a/indra/llmessage/llcoproceduremanager.h
+++ b/indra/llmessage/llcoproceduremanager.h
@@ -39,6 +39,7 @@ class LLCoprocedureManager : public LLSingleton < LLCoprocedureManager >
 {
     LLSINGLETON(LLCoprocedureManager);
     virtual ~LLCoprocedureManager();
+    /*virtual*/ void initSingleton();
 
 public:
     typedef boost::function<U32(const std::string &)> SettingQuery_t;
-- 
GitLab