summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcoproceduremanager.cpp
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2020-08-13 20:20:20 +0000
committerDave Houlton <euclid@lindenlab.com>2020-08-13 20:20:20 +0000
commit8189c900d840705255ee8c4ae9acbcd9d31c16e0 (patch)
tree0534a7f0cbe461b5dac33444f16a535dc9d13446 /indra/llmessage/llcoproceduremanager.cpp
parentb55be119002d547887e739d50be3136e5040fa25 (diff)
parent0c0ed56167f76820f612d0069b1f2d6462cfcf98 (diff)
Merged in DV497-merge-6.4.7 (pull request #237)
Merge master v6.4.7 to LMR#4 DRTVWR-497
Diffstat (limited to 'indra/llmessage/llcoproceduremanager.cpp')
-rw-r--r--indra/llmessage/llcoproceduremanager.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp
index a7bd836c4d..42c19e3b1c 100644
--- a/indra/llmessage/llcoproceduremanager.cpp
+++ b/indra/llmessage/llcoproceduremanager.cpp
@@ -280,11 +280,14 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):
mHTTPPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mCoroMapping()
{
- // store in our LLTempBoundListener so that when the LLCoprocedurePool is
- // destroyed, we implicitly disconnect from this LLEventPump
- mStatusListener = LLEventPumps::instance().obtain("LLApp").listen(
- poolName,
- [pendingCoprocs=mPendingCoprocs, poolName](const LLSD& status)
+ try
+ {
+ // store in our LLTempBoundListener so that when the LLCoprocedurePool is
+ // destroyed, we implicitly disconnect from this LLEventPump
+ // Monitores application status
+ mStatusListener = LLEventPumps::instance().obtain("LLApp").listen(
+ poolName + "_pool", // Make sure it won't repeat names from lleventcoro
+ [pendingCoprocs = mPendingCoprocs, poolName](const LLSD& status)
{
auto& statsd = status["status"];
if (statsd.asString() != "running")
@@ -298,6 +301,19 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):
}
return false;
});
+ }
+ catch (const LLEventPump::DupListenerName &)
+ {
+ // This shounldn't be possible since LLCoprocedurePool is supposed to have unique names,
+ // yet it somehow did happen, as result pools got '_pool' suffix and this catch.
+ //
+ // If this somehow happens again it is better to crash later on shutdown due to pump
+ // not stopping coroutine and see warning in logs than on startup or during login.
+ LL_WARNS("CoProcMgr") << "Attempted to register dupplicate listener name: " << poolName
+ << "_pool. Failed to start listener." << LL_ENDL;
+
+ llassert(0); // Fix Me! Ignoring missing listener!
+ }
for (size_t count = 0; count < mPoolSize; ++count)
{