From 8aedbbda159344ed1af042e562c34ae5759a3b0d Mon Sep 17 00:00:00 2001 From: Bjoseph Wombat Date: Tue, 6 Oct 2015 13:18:53 -0400 Subject: A small state machine change to wait until the media update event has arrived when leaving a region channel and before joining a p2p channel --- indra/newview/llvoicevivox.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index e4b045bdeb..77ce2d9b8f 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1538,8 +1538,9 @@ void LLVivoxVoiceClient::stateMachine() // Must do this first, since it uses mAudioSession. notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); - if (mAudioSession) + if (mAudioSession && mSessionTerminateRequested) { + // will only go this section on the frist frame when a call is being cancelled. leaveAudioSession(); sessionState *oldSession = mAudioSession; @@ -1556,6 +1557,8 @@ void LLVivoxVoiceClient::stateMachine() } // Always reset the terminate request flag when we get here. + // Some slower PCs have a race condition where they can switch to an incoming P2P call faster than the state machine leaves + // the region chat. mSessionTerminateRequested = false; if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested && !LLApp::isExiting()) @@ -3176,6 +3179,9 @@ void LLVivoxVoiceClient::leftAudioSession( break; } } + else if ( mAudioSession == NULL && (getState() == stateSessionTerminated) ){ + setState(stateNoChannel); + } } void LLVivoxVoiceClient::accountLoginStateChangeEvent( -- cgit v1.2.3