Skip to content

Commit

Permalink
fix: need conn peer filer error
Browse files Browse the repository at this point in the history
  • Loading branch information
cody committed May 23, 2024
1 parent 3b2c1a6 commit 14a123f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/node/peering.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ func PeerWithLastConn() fx.Option {

connection := make(map[peer.ID]bool)
for _, id := range peerIds {
if host.Network().Connectedness(id) != network.Connected || id != host.ID() || !filter[id] {
connection[id] = true
if host.Network().Connectedness(id) == network.Connected || id == host.ID() || filter[id] {
continue
}
connection[id] = true
}

g := errgroup.Group{}
Expand Down

0 comments on commit 14a123f

Please sign in to comment.