Skip to content

Commit

Permalink
Log failed crawls
Browse files Browse the repository at this point in the history
  • Loading branch information
achow101 committed May 6, 2024
1 parent e7f9ecf commit 8ff4e26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/crawl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ fn crawl_node(node: &NodeInfo, net_status: NetStatus) -> Vec<CrawledNode> {
let mut node_info = node.clone();
node_info.last_tried = tried_timestamp;
ret_addrs.push(CrawledNode::Failed(CrawlInfo { node_info, age }));
println!("Failed: {}", &node.addr.to_string());
return ret_addrs;
}
let sock = sock_res.unwrap();
Expand Down Expand Up @@ -331,6 +332,7 @@ fn crawl_node(node: &NodeInfo, net_status: NetStatus) -> Vec<CrawledNode> {
let mut node_info = node.clone();
node_info.last_tried = tried_timestamp;
ret_addrs.push(CrawledNode::Failed(CrawlInfo { node_info, age }));
println!("Failed: {}", &node.addr.to_string());
}

let _ = sock.shutdown(Shutdown::Both);
Expand Down

0 comments on commit 8ff4e26

Please # to comment.