From 00c6d305cd669312ea54790391be1079a4af45e1 Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Thu, 2 Jan 2025 17:03:05 +0100 Subject: [PATCH] exclude router from peers to connect to --- management/server/types/account.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/management/server/types/account.go b/management/server/types/account.go index bb4818f3747..8ca05dc1eb6 100644 --- a/management/server/types/account.go +++ b/management/server/types/account.go @@ -317,8 +317,6 @@ func (a *Account) addNetworksRoutingPeers( networkRoutesPeers[r.PeerID] = struct{}{} } - delete(sourcePeers, peer.ID) - for _, existingPeer := range peersToConnect { delete(sourcePeers, existingPeer.ID) delete(networkRoutesPeers, existingPeer.ID) @@ -335,14 +333,11 @@ func (a *Account) addNetworksRoutingPeers( } } for p := range networkRoutesPeers { - if p == peer.ID { - continue - } missingPeers[p] = struct{}{} } for p := range missingPeers { - if missingPeer := a.Peers[p]; missingPeer != nil { + if missingPeer := a.Peers[p]; missingPeer != nil && missingPeer.ID != peer.ID { peersToConnect = append(peersToConnect, missingPeer) } }