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-22 23:11:35 -0800
commit85f987128b2094d4bbce177ff9f7654eb7921e49 (patch)
treec3cad199303368d10cdd8af4f9b034cf592a76f6 /indra/llwebrtc
parent72d66a9a425014d35543e5a145aea1e2df0ececa (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());
+
}
//