The response from the provision account call was being called twice for some reason
parent
2c2529d3c8
commit
70044b9d2b
|
|
@ -649,21 +649,26 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection()
|
|||
return true;
|
||||
}
|
||||
|
||||
void LLWebRTCPeerConnectionImpl::shutdownConnection()
|
||||
bool LLWebRTCPeerConnectionImpl::shutdownConnection()
|
||||
{
|
||||
mWebRTCImpl->PostSignalingTask(
|
||||
[this]()
|
||||
{
|
||||
if (mPeerConnection)
|
||||
if (mPeerConnection)
|
||||
{
|
||||
mWebRTCImpl->PostSignalingTask(
|
||||
[this]()
|
||||
{
|
||||
mPeerConnection->Close();
|
||||
mPeerConnection = nullptr;
|
||||
}
|
||||
for (auto &observer : mSignalingObserverList)
|
||||
{
|
||||
observer->OnPeerShutDown();
|
||||
}
|
||||
});
|
||||
if (mPeerConnection)
|
||||
{
|
||||
mPeerConnection->Close();
|
||||
mPeerConnection = nullptr;
|
||||
}
|
||||
for (auto &observer : mSignalingObserverList)
|
||||
{
|
||||
observer->OnPeerShutDown();
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLWebRTCPeerConnectionImpl::enableSenderTracks(bool enable)
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class LLWebRTCPeerConnection
|
|||
virtual void unsetSignalingObserver(LLWebRTCSignalingObserver* observer) = 0;
|
||||
|
||||
virtual bool initializeConnection() = 0;
|
||||
virtual void shutdownConnection() = 0;
|
||||
virtual bool shutdownConnection() = 0;
|
||||
virtual void AnswerAvailable(const std::string &sdp) = 0;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ class LLWebRTCPeerConnectionImpl : public LLWebRTCPeerConnection,
|
|||
void setSignalingObserver(LLWebRTCSignalingObserver *observer) override;
|
||||
void unsetSignalingObserver(LLWebRTCSignalingObserver *observer) override;
|
||||
bool initializeConnection() override;
|
||||
void shutdownConnection() override;
|
||||
bool shutdownConnection() override;
|
||||
void AnswerAvailable(const std::string &sdp) override;
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -438,12 +438,9 @@ void LLVoiceChannelGroup::activate()
|
|||
}
|
||||
}
|
||||
|
||||
//Mic default state is OFF on initiating/joining Ad-Hoc/Group calls
|
||||
if (LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle())
|
||||
{
|
||||
LLVoiceClient::getInstance()->inputUserControlState(true);
|
||||
}
|
||||
|
||||
// Mic default state is OFF on initiating/joining Ad-Hoc/Group calls. It's on for P2P using the AdHoc infra.
|
||||
|
||||
LLVoiceClient::getInstance()->setUserPTTState(mNotifyOnFirstJoin);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2395,8 +2395,11 @@ LLVoiceWebRTCConnection::~LLVoiceWebRTCConnection()
|
|||
// by llwebrtc::terminate() on shutdown.
|
||||
return;
|
||||
}
|
||||
llwebrtc::freePeerConnection(mWebRTCPeerConnection);
|
||||
mWebRTCPeerConnection = nullptr;
|
||||
if (mWebRTCPeerConnection)
|
||||
{
|
||||
llwebrtc::freePeerConnection(mWebRTCPeerConnection);
|
||||
mWebRTCPeerConnection = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceWebRTCConnection::OnIceGatheringState(llwebrtc::LLWebRTCSignalingObserver::IceGatheringState state)
|
||||
|
|
@ -2689,8 +2692,10 @@ void LLVoiceWebRTCConnection::OnVoiceDisconnectionRequestSuccess(const LLSD &res
|
|||
|
||||
if (mWebRTCPeerConnection)
|
||||
{
|
||||
mOutstandingRequests++;
|
||||
mWebRTCPeerConnection->shutdownConnection();
|
||||
if (mWebRTCPeerConnection->shutdownConnection())
|
||||
{
|
||||
mOutstandingRequests++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2765,6 +2770,7 @@ void LLVoiceWebRTCConnection::OnVoiceConnectionRequestFailure(std::string url, i
|
|||
}
|
||||
if (retries >= 0)
|
||||
{
|
||||
LL_WARNS("Voice") << "Failure connecting to voice, retrying." << body << " RESULT: " << result << LL_ENDL;
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost(
|
||||
url,
|
||||
LLCore::HttpRequest::DEFAULT_POLICY_ID,
|
||||
|
|
|
|||
Loading…
Reference in New Issue