diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-10-20 22:52:35 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-10-20 22:52:35 -0700 |
commit | ed6ebed0816ed82a51c770ed047e79affb40cefb (patch) | |
tree | aa7f8dfc7355465a4c32868e159c523129846b11 /indra | |
parent | 99937bf3d4c68fa32cdc888b8cd9b9ed9d43fdbf (diff) |
Don't double-add data channel observer
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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); |