summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-03-22 17:00:34 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-03-22 17:00:34 -0700
commit168081c7e9c4fb89209aae225f849573caaf905a (patch)
tree8d37e0254194a91cd43171bd84ffc02b802bcdc8 /indra/newview
parente242c129f9d56161496a50397b79da1e444e8de4 (diff)
Validate that we're not shutting down after coroutine processing
Coroutine yields can end after shutdown is requested and voice connections are removed, so we need to check that a shutdown hasn't occured before attempting to touch connection objects. (CR issue)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoicewebrtc.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 57c95777c2..80e7323b6f 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -2180,6 +2180,12 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro()
httpOpts->setWantHeaders(true);
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts);
+
+ if (LLWebRTCVoiceClient::isShuttingDown())
+ {
+ return;
+ }
+
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@@ -2386,6 +2392,11 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro()
// also shut things down.
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts);
+ if (LLWebRTCVoiceClient::isShuttingDown())
+ {
+ return;
+ }
+
if (mWebRTCPeerConnectionInterface)
{
mWebRTCPeerConnectionInterface->shutdownConnection();