diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-08-20 15:34:20 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-08-20 15:34:20 -0700 |
commit | 45ebc5867a745dd4a746694317d715cbcead0871 (patch) | |
tree | b9e05dc5d6f880da619e2f71225fed9799b3f7a0 /indra/newview/llvoicewebrtc.cpp | |
parent | 75a5cd62d7f63f642d4d88fafc955aaf22f471e7 (diff) |
Fix hang when incoming p2p or group calls throw up dialog.
There were changes in atlasaurus that resulted in a hang for incoming p2p
and group calls which throw up dialogs. The changes revolved around mutex,
coroutines, job queues, and such.
The fix was to do any processing that may result in callbacks from
the webrtc code in a queued job instead of a coroutine.
Diffstat (limited to 'indra/newview/llvoicewebrtc.cpp')
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 387016f9af..1ea5ef2670 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -549,13 +549,20 @@ void LLWebRTCVoiceClient::voiceConnectionCoro() updatePosition(); } } - - sessionState::processSessionStates(); - if (mProcessChannels && voiceEnabled && !mHidden) - { - sendPositionUpdate(false); - updateOwnVolume(); - } + LL::WorkQueue::postMaybe(mMainQueue, + [=] { + if (sShuttingDown) + { + return; + } + sessionState::processSessionStates(); + //sessionState::processSessionStates(); + if (mProcessChannels && voiceEnabled && !mHidden) + { + sendPositionUpdate(false); + updateOwnVolume(); + } + }); } } catch (const LLCoros::Stop&) @@ -2221,6 +2228,7 @@ void LLVoiceWebRTCConnection::OnIceCandidate(const llwebrtc::LLWebRTCIceCandidat void LLVoiceWebRTCConnection::processIceUpdates() { mOutstandingRequests++; + LLCoros::getInstance()->launch("LLVoiceWebRTCConnection::processIceUpdatesCoro", boost::bind(&LLVoiceWebRTCConnection::processIceUpdatesCoro, this->shared_from_this())); } |