Skip to content

Commit

Permalink
Do not register data channel twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ferjm committed Jun 29, 2020
1 parent a6a00d5 commit b968852
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/script/dom/rtcpeerconnection.rs
Expand Up @@ -301,8 +301,6 @@ impl RTCPeerConnection {
Some(channel_id),
);

self.register_data_channel(channel_id, &channel);

let event = RTCDataChannelEvent::new(
&self.global(),
atom!("datachannel"),
Expand Down Expand Up @@ -334,9 +332,9 @@ impl RTCPeerConnection {
.data_channels
.borrow_mut()
.insert(id, Dom::from_ref(channel))
.is_none()
.is_some()
{
debug_assert!(false, "Could not register data channel");
debug_assert!(false, "Data channel already registered");
}
}

Expand Down

0 comments on commit b968852

Please sign in to comment.