fix problem of multiple creation of PeerUI when peer has joined mutliple times without successfully creating a p2p connection

This commit is contained in:
schlagmichdoch 2022-12-22 22:41:26 +01:00
parent 75846f4de1
commit e5a2c6326e
2 changed files with 26 additions and 22 deletions

View file

@ -311,7 +311,7 @@ class RTCPeer extends Peer {
_onChannelClosed() {
console.log('RTC: channel closed', this._peerId);
Events.fire('peer-left', this._peerId);
Events.fire('peer-disconnected', this._peerId);
if (!this._isCaller) return;
this._connect(this._peerId, true); // reopen the channel
}