diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-12-06 20:56:26 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-12-06 21:09:01 +0200 |
commit | a06c16da42af47b0183aab59b5b5b85ca59f5d06 (patch) | |
tree | 42a699d1fb8b59d107933dccb0cae76674f9a13e /indra/newview/llvoicevivox.cpp | |
parent | e7b4e046e25bd296248998586cf6d30d5b774e33 (diff) |
SL-16446 Crash at loginToVivox when viewer quits
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r-- | indra/newview/llvoicevivox.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index c7a544f8eb..2dddf1a5ef 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -705,6 +705,11 @@ void LLVivoxVoiceClient::voiceControlCoro() void LLVivoxVoiceClient::voiceControlStateMachine(S32 &coro_state) { + if (sShuttingDown) + { + return; + } + LL_DEBUGS("Voice") << "starting" << LL_ENDL; mIsCoroutineActive = true; LLCoros::set_consuming(true); @@ -860,6 +865,12 @@ void LLVivoxVoiceClient::voiceControlStateMachine(S32 &coro_state) } } while (coro_state > 0); + if (sShuttingDown) + { + // LLVivoxVoiceClient might be already dead + return; + } + mIsCoroutineActive = false; LL_INFOS("Voice") << "exiting" << LL_ENDL; } @@ -1343,6 +1354,12 @@ bool LLVivoxVoiceClient::loginToVivox() } LLSD result = llcoro::suspendUntilEventOnWithTimeout(mVivoxPump, LOGIN_ATTEMPT_TIMEOUT, timeoutResult); + + if (sShuttingDown) + { + return false; + } + LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL; if (result.has("login")) @@ -1405,6 +1422,11 @@ bool LLVivoxVoiceClient::loginToVivox() } while ((!response_ok || !account_login) && !sShuttingDown); + if (sShuttingDown) + { + return false; + } + mRelogRequested = false; mIsLoggedIn = true; notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGGED_IN); |