diff --git a/src/background/p2p.js b/src/background/p2p.js index f14e1f7..1481ac0 100644 --- a/src/background/p2p.js +++ b/src/background/p2p.js @@ -160,6 +160,13 @@ class p2p { { data.peers.forEach(peer => this.add(peer)) } + + // someone connected to our server, make sure that status updated properly + if (this.p2pStatus === 0) { + // switch to direct status, otherwise it's relay + this.p2pStatus = 2 + this.send('p2pStatus', this.p2pStatus) + } }) // new peer with peer exchange