diff options
author | Bjoseph Wombat <bjoseph@vivox.com> | 2015-10-06 13:18:53 -0400 |
---|---|---|
committer | Bjoseph Wombat <bjoseph@vivox.com> | 2015-10-06 13:18:53 -0400 |
commit | 8aedbbda159344ed1af042e562c34ae5759a3b0d (patch) | |
tree | 6e16be9b5ef7a14181736f1b533ce30c3075aee0 /indra | |
parent | 5a540f7523cb1c920709be986bf417cac172b244 (diff) |
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
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llvoicevivox.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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( |