diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-10-13 20:16:52 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-10-13 21:19:24 +0300 |
| commit | 57a9e51360aebf142bbbdc2663f68ebacfb7d8f5 (patch) | |
| tree | 9ee0b36fa08a99444260baaf5ea9b019758bb125 /indra/newview/llvoicewebrtc.cpp | |
| parent | 95337dfc36113dca030c38a447b2ffa29b5bed9c (diff) | |
#4819 WebRTC crashes after a failed login
Diffstat (limited to 'indra/newview/llvoicewebrtc.cpp')
| -rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 62bab7d24a..72a60c506b 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -273,6 +273,11 @@ void LLWebRTCVoiceClient::cleanupSingleton() void LLWebRTCVoiceClient::init(LLPumpIO* pump) { // constructor will set up LLVoiceClient::getInstance() + initWebRTC(); +} + +void LLWebRTCVoiceClient::initWebRTC() +{ llwebrtc::init(this); mWebRTCDeviceInterface = llwebrtc::getDeviceInterface(); @@ -292,6 +297,7 @@ void LLWebRTCVoiceClient::terminate() mVoiceEnabled = false; llwebrtc::terminate(); + mWebRTCDeviceInterface = nullptr; sShuttingDown = true; } @@ -1805,6 +1811,15 @@ void LLWebRTCVoiceClient::onChangeDetailed(const LLMute& mute) } } +void LLWebRTCVoiceClient::userAuthorized(const std::string& user_id, const LLUUID& agentID) +{ + if (sShuttingDown) + { + sShuttingDown = false; // was terminated, restart + initWebRTC(); + } +} + void LLWebRTCVoiceClient::predSetUserMute(const LLWebRTCVoiceClient::sessionStatePtr_t &session, const LLUUID &id, bool mute) { session->setUserMute(id, mute); |
