Skip to content

Commit

Permalink
Add logging in all the places where the main loop might be terminated
Browse files Browse the repository at this point in the history
to stdout and stderr for good measure... 🤷
  • Loading branch information
rklaehn authored and ppodolsky committed Jul 3, 2024
1 parent 1bf2d61 commit b948639
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion iroh/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,15 @@ impl<D: iroh_blobs::store::Store> NodeInner<D> {
Some(Err(outer)) => {
if outer.is_panic() {
error!("Task panicked: {outer:?}");
println!("Task panicked: {outer:?}");
eprintln!("Task panicked: {outer:?}");
break;
} else if outer.is_cancelled() {
debug!("Task cancelled: {outer:?}");
} else {
error!("Task failed: {outer:?}");
println!("Task failed: {outer:?}");
eprintln!("Task failed: {outer:?}");
break;
}
}
Expand All @@ -331,7 +335,12 @@ impl<D: iroh_blobs::store::Store> NodeInner<D> {
_ => {}
}
},
else => break,
else => {
error!("Node task ended unexpectedly");
println!("Node task ended unexpectedly");
eprintln!("Node task ended unexpectedly");
break
},
}
}

Expand Down

0 comments on commit b948639

Please sign in to comment.