MAINT-8362 Don't reconnect voice while in teleport
parent
0f4ff672bd
commit
5c62ea3e08
|
|
@ -643,7 +643,13 @@ void LLVivoxVoiceClient::voiceControlCoro()
|
|||
{
|
||||
mIsCoroutineActive = true;
|
||||
LLCoros::set_consuming(true);
|
||||
|
||||
|
||||
while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
|
||||
{
|
||||
LL_INFOS("Voice") << "Suspending voiceControlCoro() due to teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL;
|
||||
llcoro::suspendUntilTimeout(1.0);
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
|
|
@ -665,7 +671,7 @@ void LLVivoxVoiceClient::voiceControlCoro()
|
|||
// and then reconstruct the voice connecion from scratch.
|
||||
if (mRelogRequested)
|
||||
{
|
||||
while (isGatewayRunning())
|
||||
while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
|
||||
{
|
||||
llcoro::suspendUntilTimeout(1.0);
|
||||
}
|
||||
|
|
@ -1302,7 +1308,7 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)
|
|||
|
||||
mAudioSession = nextSession;
|
||||
mAudioSessionChanged = true;
|
||||
if (!mAudioSession->mReconnect)
|
||||
if (!mAudioSession || !mAudioSession->mReconnect)
|
||||
{
|
||||
mNextAudioSession.reset();
|
||||
}
|
||||
|
|
@ -1310,16 +1316,19 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)
|
|||
// The old session may now need to be deleted.
|
||||
reapSession(oldSession);
|
||||
|
||||
if (!mAudioSession->mHandle.empty())
|
||||
if (mAudioSession)
|
||||
{
|
||||
// Connect to a session by session handle
|
||||
if (!mAudioSession->mHandle.empty())
|
||||
{
|
||||
// Connect to a session by session handle
|
||||
|
||||
sessionMediaConnectSendMessage(mAudioSession);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Connect to a session by URI
|
||||
sessionCreateSendMessage(mAudioSession, true, false);
|
||||
sessionMediaConnectSendMessage(mAudioSession);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Connect to a session by URI
|
||||
sessionCreateSendMessage(mAudioSession, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING);
|
||||
|
|
@ -1384,6 +1393,11 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)
|
|||
LL_INFOS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL;
|
||||
if (result.has("session"))
|
||||
{
|
||||
if (!mAudioSession)
|
||||
{
|
||||
LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while session is not initialized." << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
if (result.has("handle") && result["handle"] != mAudioSession->mHandle)
|
||||
{
|
||||
LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while waiting for \"" << mAudioSession->mHandle << "\"." << LL_ENDL;
|
||||
|
|
@ -1722,6 +1736,11 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
|
|||
{
|
||||
if (result.has("handle"))
|
||||
{
|
||||
if (!mAudioSession)
|
||||
{
|
||||
LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while session is not initiated." << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
if (result["handle"] != mAudioSession->mHandle)
|
||||
{
|
||||
LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while waiting for \"" << mAudioSession->mHandle << "\"." << LL_ENDL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue