summaryrefslogtreecommitdiff
path: root/indra/llwebrtc/llwebrtc.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-01-29 14:43:23 +0800
committerErik Kundiman <erik@megapahit.org>2026-01-29 14:43:23 +0800
commitdbe9c9c1929cfb345f9363e4ba1cb4128188d2f3 (patch)
treee97d3f034dc68c68af99034765683c58c771f6d3 /indra/llwebrtc/llwebrtc.cpp
parent4644df66c9f210c8cda81ae63e4c6a6b7ebece9f (diff)
parente42ec63bfd7ada1087a00ca3ccc39c95679b7fab (diff)
Merge tag 'Second_Life_Release#e42ec63b-2026.01' into 2026.01
Diffstat (limited to 'indra/llwebrtc/llwebrtc.cpp')
-rw-r--r--indra/llwebrtc/llwebrtc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index 927db86901..d780b1d606 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -830,6 +830,7 @@ LLWebRTCPeerConnectionImpl::~LLWebRTCPeerConnectionImpl()
{
mSignalingObserverList.clear();
mDataObserverList.clear();
+ mPeerConnectionFactory.release();
if (mPendingJobs > 0)
{
RTC_LOG(LS_ERROR) << __FUNCTION__ << "Destroying a connection that has " << std::to_string(mPendingJobs) << " unfinished jobs that might cause workers to crash";
@@ -893,7 +894,6 @@ void LLWebRTCPeerConnectionImpl::terminate()
}
mPendingJobs--;
});
- mPeerConnectionFactory.release();
}
void LLWebRTCPeerConnectionImpl::setSignalingObserver(LLWebRTCSignalingObserver *observer) { mSignalingObserverList.emplace_back(observer); }
@@ -1020,6 +1020,7 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti
}
webrtc::PeerConnectionInterface::RTCOfferAnswerOptions offerOptions;
+ this->AddRef(); // CreateOffer will deref this when it's done. Without this, the callbacks never get called.
mPeerConnection->CreateOffer(this, offerOptions);
mPendingJobs--;
});