From ed6ebed0816ed82a51c770ed047e79affb40cefb Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Sun, 20 Oct 2024 22:52:35 -0700 Subject: Don't double-add data channel observer --- indra/newview/llvoicewebrtc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index dbeccb51d8..2a3f633858 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -3045,7 +3045,9 @@ void LLVoiceWebRTCConnection::OnDataChannelReady(llwebrtc::LLWebRTCDataInterface return; } - if (data_interface) + // OnDataChannelReady may be called multiple times in a single connection attempt + // so don't double-set the observer. + if (!mWebRTCDataInterface && data_interface) { mWebRTCDataInterface = data_interface; mWebRTCDataInterface->setDataObserver(this); -- cgit v1.2.3