fix peer._channel is undefined

This commit is contained in:
schlagmichdoch 2023-01-06 19:50:09 +01:00
parent a649a6990e
commit 62b9e4e9e4

View file

@ -443,7 +443,7 @@ class PeersManager {
const peer = this.peers[peerId];
delete this.peers[peerId];
if (!peer || !peer._conn) return;
peer._channel.onclose = null;
if (peer._channel) peer._channel.onclose = null;
peer._conn.close();
}