mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-21 15:26:17 -04:00
only reopen connection if it exists
This commit is contained in:
parent
98a6f63799
commit
6268ac7132
1 changed files with 1 additions and 2 deletions
|
@ -329,8 +329,7 @@ class RTCPeer extends Peer {
|
||||||
_onChannelClosed() {
|
_onChannelClosed() {
|
||||||
console.log('RTC: channel closed', this._peerId);
|
console.log('RTC: channel closed', this._peerId);
|
||||||
Events.fire('peer-disconnected', this._peerId);
|
Events.fire('peer-disconnected', this._peerId);
|
||||||
if (!this._isCaller) return;
|
if (!this._isCaller || !this._conn) return;
|
||||||
if (!this._conn)
|
|
||||||
this._connect(this._peerId, true); // reopen the channel
|
this._connect(this._peerId, true); // reopen the channel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue