summaryrefslogtreecommitdiff
path: root/indra/llwebrtc
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2023-10-19 14:50:12 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-02-08 18:34:01 -0800
commita7b70788a8f7c3cf607242851e6f65aaf446515b (patch)
tree2bc912614b86007752c2239f5be9b19f16118056 /indra/llwebrtc
parent5c574d44c5770353c5063209668b10a5fbdd5e05 (diff)
quicker turnaround on re-establishing voice when server goes down.
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r--indra/llwebrtc/llwebrtc.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index 78968fc89b..194c7cd5d4 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -497,7 +497,7 @@ bool LLWebRTCImpl::initializeConnection()
void LLWebRTCImpl::shutdownConnection()
{
- mSignalingThread->PostTask(
+ mSignalingThread->BlockingCall(
[this]()
{
if (mPeerConnection)
@@ -507,24 +507,21 @@ void LLWebRTCImpl::shutdownConnection()
}
mPeerConnectionFactory = nullptr;
});
- mWorkerThread->PostTask(
+ mWorkerThread->BlockingCall(
[this]()
{
- if (mTuningDeviceModule)
- {
- mTuningDeviceModule->StopRecording();
- mTuningDeviceModule->Terminate();
- }
if (mPeerDeviceModule)
{
mPeerDeviceModule->StopRecording();
mPeerDeviceModule->Terminate();
}
- mTuningDeviceModule = nullptr;
mPeerDeviceModule = nullptr;
- mTaskQueueFactory = nullptr;
+ if (mPeerAudioDeviceObserver)
+ {
+ mPeerAudioDeviceObserver = nullptr;
+ }
});
- mNetworkThread->PostTask(
+ mNetworkThread->BlockingCall(
[this]()
{
if (mDataChannel)
@@ -694,6 +691,7 @@ static std::string iceCandidateToTrickleString(const webrtc::IceCandidateInterfa
std::to_string(candidate->candidate().priority()) << " " <<
candidate->candidate().address().ipaddr().ToString() << " " <<
candidate->candidate().address().PortAsString() << " typ ";
+
if (candidate->candidate().type() == cricket::LOCAL_PORT_TYPE)
{
candidate_stream << "host";
@@ -716,6 +714,9 @@ static std::string iceCandidateToTrickleString(const webrtc::IceCandidateInterfa
"raddr " << candidate->candidate().related_address().ipaddr().ToString() << " " <<
"rport " << candidate->candidate().related_address().PortAsString();
}
+ else {
+ RTC_LOG(LS_ERROR) << __FUNCTION__ << " Unknown candidate type " << candidate->candidate().type();
+ }
if (candidate->candidate().protocol() == "tcp")
{
candidate_stream << " tcptype " << candidate->candidate().tcptype();
@@ -827,8 +828,10 @@ void LLWebRTCImpl::OnSetRemoteDescriptionComplete(webrtc::RTCError error)
ice_candidate.sdp_mid = candidate->sdp_mid();
observer->OnIceCandidate(ice_candidate);
}
- mCachedIceCandidates.clear();
}
+ mCachedIceCandidates.clear();
+ OnIceGatheringChange(mPeerConnection->ice_gathering_state());
+
}
//