Commit 7cc5b01d authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

SL-15292 waitForChannel crash #3

parent 9241a87b
...@@ -698,7 +698,7 @@ void LLVivoxVoiceClient::voiceControlCoro() ...@@ -698,7 +698,7 @@ void LLVivoxVoiceClient::voiceControlCoro()
gSavedSettings.getControl("VivoxVadNoiseFloor")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this)); gSavedSettings.getControl("VivoxVadNoiseFloor")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
gSavedSettings.getControl("VivoxVadSensitivity")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this)); gSavedSettings.getControl("VivoxVadSensitivity")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
if (mTuningMode) if (mTuningMode && !sShuttingDown)
{ {
performMicTuning(); performMicTuning();
} }
...@@ -1272,8 +1272,11 @@ bool LLVivoxVoiceClient::loginToVivox() ...@@ -1272,8 +1272,11 @@ bool LLVivoxVoiceClient::loginToVivox()
// tell the user there is a problem // tell the user there is a problem
LL_WARNS("Voice") << "login " << loginresp << " will retry login in " << timeout << " seconds." << LL_ENDL; LL_WARNS("Voice") << "login " << loginresp << " will retry login in " << timeout << " seconds." << LL_ENDL;
llcoro::suspendUntilTimeout(timeout); if (!sShuttingDown)
{
llcoro::suspendUntilTimeout(timeout);
}
} }
else if (loginresp == "failed") else if (loginresp == "failed")
{ {
...@@ -2159,7 +2162,7 @@ bool LLVivoxVoiceClient::performMicTuning() ...@@ -2159,7 +2162,7 @@ bool LLVivoxVoiceClient::performMicTuning()
mIsInTuningMode = true; mIsInTuningMode = true;
llcoro::suspend(); llcoro::suspend();
while (mTuningMode) while (mTuningMode && !sShuttingDown)
{ {
if (mCaptureDeviceDirty || mRenderDeviceDirty) if (mCaptureDeviceDirty || mRenderDeviceDirty)
...@@ -2195,9 +2198,12 @@ bool LLVivoxVoiceClient::performMicTuning() ...@@ -2195,9 +2198,12 @@ bool LLVivoxVoiceClient::performMicTuning()
tuningCaptureStartSendMessage(1); // 1-loop, zero, don't loop tuningCaptureStartSendMessage(1); // 1-loop, zero, don't loop
//--------------------------------------------------------------------- //---------------------------------------------------------------------
llcoro::suspend(); if (!sShuttingDown)
{
llcoro::suspend();
}
while (mTuningMode && !mCaptureDeviceDirty && !mRenderDeviceDirty) while (mTuningMode && !mCaptureDeviceDirty && !mRenderDeviceDirty && !sShuttingDown)
{ {
// process mic/speaker volume changes // process mic/speaker volume changes
if (mTuningMicVolumeDirty || mTuningSpeakerVolumeDirty) if (mTuningMicVolumeDirty || mTuningSpeakerVolumeDirty)
...@@ -2237,7 +2243,7 @@ bool LLVivoxVoiceClient::performMicTuning() ...@@ -2237,7 +2243,7 @@ bool LLVivoxVoiceClient::performMicTuning()
// transition out of mic tuning // transition out of mic tuning
tuningCaptureStopSendMessage(); tuningCaptureStopSendMessage();
if (mCaptureDeviceDirty || mRenderDeviceDirty) if ((mCaptureDeviceDirty || mRenderDeviceDirty) && !sShuttingDown)
{ {
llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment