From 168081c7e9c4fb89209aae225f849573caaf905a Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Fri, 22 Mar 2024 17:00:34 -0700 Subject: 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) --- indra/newview/llvoicewebrtc.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview') 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(); -- cgit v1.2.3