From f53a3e5624645bd23cc83851f886fe98d575958a Mon Sep 17 00:00:00 2001
From: librelois <elois@ifee.fr>
Date: Thu, 2 Nov 2017 21:32:34 +0100
Subject: [PATCH] Revert "[fix] prevent oneself ws2p connection when new
 endpoint is received"

This reverts commit de0c69161f3875637fba91824dea3ffdfd76c7c0.
---
 app/modules/ws2p/lib/WS2PCluster.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/modules/ws2p/lib/WS2PCluster.ts b/app/modules/ws2p/lib/WS2PCluster.ts
index 97fab3241..300180ff9 100644
--- a/app/modules/ws2p/lib/WS2PCluster.ts
+++ b/app/modules/ws2p/lib/WS2PCluster.ts
@@ -376,7 +376,7 @@ export class WS2PCluster {
             // Check if already connected to the pubkey (in any way: server or client)
             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)
-            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.trimClientConnections()
             }
-- 
GitLab