fix peer._channel is undefined
This commit is contained in:
parent
a649a6990e
commit
62b9e4e9e4
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue