Swarm dial returns ok even if peer is not accessible #2844
-
Hey i tried to dial a random multiaddr which is not accessible. but if I write it in swam dial it returns Ok rust code:
Output: libp2p-lookup: Is this the expected behavior? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
dial
is asynchronous and only some pre-conditions are checked synchronously. You need topoll
the Swarm (vianext
for example) and have it make progress which will eventually yield an event that informs you whether the dial was successful.