prevent channel from opening if connection is closed
This commit is contained in:
parent
9c6637b3f5
commit
19d7e6fecd
1 changed files with 1 additions and 0 deletions
|
@ -518,6 +518,7 @@ class RTCPeer extends Peer {
|
|||
}
|
||||
|
||||
_openChannel() {
|
||||
if (this._conn.signalingState === "closed") return;
|
||||
const channel = this._conn.createDataChannel('data-channel', {
|
||||
ordered: true,
|
||||
reliable: true // Obsolete. See https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/reliable
|
||||
|
|
Loading…
Reference in a new issue