fix(gui): connection status fix detection in some situations

This commit is contained in:
Alexey Kasyanchuk 2020-01-07 13:10:59 +03:00
parent 91aebaa63a
commit 2e05bc9e68

View File

@ -160,6 +160,13 @@ class p2p {
{ {
data.peers.forEach(peer => this.add(peer)) 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 // new peer with peer exchange