mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-06 01:43:48 +00:00
prevent channel from opening if connection is closed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user