Skip to content

Commit ed6ebed

Browse files
committed
Don't double-add data channel observer
1 parent 99937bf commit ed6ebed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

indra/newview/llvoicewebrtc.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3045,7 +3045,9 @@ void LLVoiceWebRTCConnection::OnDataChannelReady(llwebrtc::LLWebRTCDataInterface
30453045
return;
30463046
}
30473047

3048-
if (data_interface)
3048+
// OnDataChannelReady may be called multiple times in a single connection attempt
3049+
// so don't double-set the observer.
3050+
if (!mWebRTCDataInterface && data_interface)
30493051
{
30503052
mWebRTCDataInterface = data_interface;
30513053
mWebRTCDataInterface->setDataObserver(this);

0 commit comments

Comments
 (0)