Skip to content

Commit

Permalink
Drop redundant reconnection logs
Browse files Browse the repository at this point in the history
We already log connection attempts in `do_connect_peer`, so no need to
additionally log them just to note it's a reconnection.
  • Loading branch information
tnull committed Feb 5, 2025
1 parent 9384507 commit 050fa4d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,18 +394,10 @@ impl Node {
.collect::<Vec<_>>();

for peer_info in connect_peer_store.list_peers().iter().filter(|info| !pm_peers.contains(&info.node_id)) {
let res = connect_cm.do_connect_peer(
let _ = connect_cm.do_connect_peer(
peer_info.node_id,
peer_info.address.clone(),
).await;
match res {
Ok(_) => {
log_info!(connect_logger, "Successfully reconnected to peer {}", peer_info.node_id);
},
Err(e) => {
log_error!(connect_logger, "Failed to reconnect to peer {}: {}", peer_info.node_id, e);
}
}
}
}
}
Expand Down

0 comments on commit 050fa4d

Please sign in to comment.