Skip to content

Commit

Permalink
exclude router from peers to connect to
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Jan 2, 2025
1 parent a1f2f00 commit 00c6d30
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions management/server/types/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
}
}
Expand Down

0 comments on commit 00c6d30

Please sign in to comment.