mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Do not register data channel twice
This commit is contained in:
parent
a6a00d5e65
commit
b968852456
1 changed files with 2 additions and 4 deletions
|
@ -301,8 +301,6 @@ impl RTCPeerConnection {
|
||||||
Some(channel_id),
|
Some(channel_id),
|
||||||
);
|
);
|
||||||
|
|
||||||
self.register_data_channel(channel_id, &channel);
|
|
||||||
|
|
||||||
let event = RTCDataChannelEvent::new(
|
let event = RTCDataChannelEvent::new(
|
||||||
&self.global(),
|
&self.global(),
|
||||||
atom!("datachannel"),
|
atom!("datachannel"),
|
||||||
|
@ -334,9 +332,9 @@ impl RTCPeerConnection {
|
||||||
.data_channels
|
.data_channels
|
||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
.insert(id, Dom::from_ref(channel))
|
.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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue