Skip to content
Snippets Groups Projects
Commit f53a3e56 authored by Éloïs's avatar Éloïs
Browse files

Revert "[fix] prevent oneself ws2p connection when new endpoint is received"

This reverts commit de0c6916.
parent a21ed389
No related branches found
No related tags found
No related merge requests found
...@@ -376,7 +376,7 @@ export class WS2PCluster { ...@@ -376,7 +376,7 @@ export class WS2PCluster {
// Check if already connected to the pubkey (in any way: server or client) // Check if already connected to the pubkey (in any way: server or client)
const connectedPubkeys = this.getConnectedPubkeys() const connectedPubkeys = this.getConnectedPubkeys()
const shouldAccept = await this.acceptPubkey(peer.pubkey, connectedPubkeys, () => this.clientsCount(), this.maxLevel1Size, (this.server.conf.ws2p && this.server.conf.ws2p.preferedNodes || []), ws2pEnpoint.uuid) const shouldAccept = await this.acceptPubkey(peer.pubkey, connectedPubkeys, () => this.clientsCount(), this.maxLevel1Size, (this.server.conf.ws2p && this.server.conf.ws2p.preferedNodes || []), ws2pEnpoint.uuid)
if (shouldAccept && (!this.server.conf.ws2p || ws2pEnpoint.uuid !== this.server.conf.ws2p.uuid)) { if (shouldAccept) {
await this.connectToRemoteWS(ws2pEnpoint.host, ws2pEnpoint.port, ws2pEnpoint.path, this.messageHandler, peer.pubkey) await this.connectToRemoteWS(ws2pEnpoint.host, ws2pEnpoint.port, ws2pEnpoint.path, this.messageHandler, peer.pubkey)
await this.trimClientConnections() await this.trimClientConnections()
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment