Skip to content

OutboundFailure (DialFailure) while trying to start a request-response #5708

Answered by dariusc93
depechec0de asked this question in Q&A
Discussion options

You must be logged in to vote

The way I usually handle it is by having a behaviour to act as an address book to store peers and their [known] addresses and when dialing it would pull from that behaviour using NetworkBehaviour::handle_pending_outbound_connection if it exist. Additionally, you could connect to the peer prior to sending the request as well by calling Swarm::dial or use ToSwarm::Dial within your behaviour.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jxs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants