diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-06-23 19:48:45 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-06-23 19:48:45 +0300 |
commit | 9451b50b2b855d6de6cc7141428575c06f46aeb0 (patch) | |
tree | 89741af6b823bf547d8ae07d1a3a979b78b557be /indra/newview/llvoicevivox.cpp | |
parent | 7cc5b01ded137769cd798229b72013a364264ded (diff) |
SL-15292 waitForChannel crash #4
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r-- | indra/newview/llvoicevivox.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index d63a6fb1da..4d2eac8c09 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -703,7 +703,10 @@ void LLVivoxVoiceClient::voiceControlCoro() performMicTuning(); } - waitForChannel(); // this doesn't normally return unless relog is needed or shutting down + if (!sShuttingDown) + { + waitForChannel(); // this doesn't normally return unless relog is needed or shutting down + } LL_DEBUGS("Voice") << "lost channel RelogRequested=" << mRelogRequested << LL_ENDL; endAndDisconnectSession(); @@ -1045,7 +1048,14 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() { F32 timeout = pow(PROVISION_RETRY_TIMEOUT, static_cast<float>(retryCount)); LL_WARNS("Voice") << "Provision CAP 404. Retrying in " << timeout << " seconds." << LL_ENDL; - llcoro::suspendUntilTimeout(timeout); + if (sShuttingDown) + { + return false; + } + else + { + llcoro::suspendUntilTimeout(timeout); + } } else if (!status) { @@ -1275,6 +1285,8 @@ bool LLVivoxVoiceClient::loginToVivox() if (!sShuttingDown) { + // Todo: this is way to long, viewer can get stuck waiting during shutdown + // either make it listen to pump or split in smaller waits with checks for shutdown llcoro::suspendUntilTimeout(timeout); } } |