Skip to content

Commit ec50c50

Browse files
committed
docs: add comment
1 parent 8af9634 commit ec50c50

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

crates/net/p2p/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ async fn handle_peer_redial(server: &mut P2PServer, peer_id: PeerId) {
397397

398398
if let Some(addr) = server.bootnode_addrs.get(&peer_id) {
399399
info!(%peer_id, "Redialing disconnected bootnode");
400+
// NOTE: this dial does some checks and adds a pending outbound connection attempt.
401+
// It does NOT block. If the dial fails, we'll later get an OutgoingConnectionError event.
400402
if let Err(e) = server.swarm.dial(addr.clone()) {
401403
warn!(%peer_id, %e, "Failed to redial bootnode, will retry");
402404
// Schedule another redial attempt

0 commit comments

Comments
 (0)