Skip to content

Commit

Permalink
delete self already from source lists
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Jan 2, 2025
1 parent 7f72524 commit 5f5ba91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion management/server/types/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ func (a *Account) addNetworksRoutingPeers(
networkRoutesPeers[r.PeerID] = struct{}{}
}

delete(sourcePeers, peer.ID)
delete(networkRoutesPeers, peer.ID)

for _, existingPeer := range peersToConnect {
delete(sourcePeers, existingPeer.ID)
delete(networkRoutesPeers, existingPeer.ID)
Expand All @@ -337,7 +340,7 @@ func (a *Account) addNetworksRoutingPeers(
}

for p := range missingPeers {
if missingPeer := a.Peers[p]; missingPeer != nil && missingPeer.ID != peer.ID {
if missingPeer := a.Peers[p]; missingPeer != nil {
peersToConnect = append(peersToConnect, missingPeer)
}
}
Expand Down

0 comments on commit 5f5ba91

Please sign in to comment.