mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-01-23 03:09:59 +00:00
filter out self on dial
This commit is contained in:
parent
b6321dc91c
commit
0e422a64fa
@ -157,7 +157,9 @@ proc discoveryTaskLoop(b: DiscoveryEngine) {.async.} =
|
||||
trace "Discovered peers for block", peers = peers.len, cid
|
||||
let
|
||||
dialed = await allFinished(
|
||||
peers.mapIt( b.network.dialPeer(it.data) ))
|
||||
peers
|
||||
.filterIt( not b.network.isSelf(it.data.peerId) )
|
||||
.mapIt( b.network.dialPeer(it.data) ))
|
||||
|
||||
for i, f in dialed:
|
||||
if f.failed:
|
||||
|
Loading…
x
Reference in New Issue
Block a user