diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-07-29 21:49:03 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-07-29 21:49:03 +0300 | 
| commit | a2b5f44b35deaf068aa39d76199b8c36d25b2da3 (patch) | |
| tree | b3e60d55162ad5dee791e6c405176b9320318977 /indra | |
| parent | 370a82b7637e0d71239cee76301b943ea08506e0 (diff) | |
| parent | 77f5a06a1e45f2aeb2f511675bcab7422b6f330d (diff) | |
Merge branch 'DRTVWR-476' into DRTVWR-501-maint
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/edit-me-to-trigger-new-build.txt | 4 | ||||
| -rw-r--r-- | indra/llmessage/llcoproceduremanager.cpp | 26 | 
2 files changed, 21 insertions, 9 deletions
| diff --git a/indra/edit-me-to-trigger-new-build.txt b/indra/edit-me-to-trigger-new-build.txt index fd40910d9e..e69de29bb2 100644 --- a/indra/edit-me-to-trigger-new-build.txt +++ b/indra/edit-me-to-trigger-new-build.txt @@ -1,4 +0,0 @@ - - - - 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)      { | 
