Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Jun 24, 2024
1 parent 6362cfb commit 488d163
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iroh-cli/src/commands/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,10 @@ impl BlobCommands {
Some(OutputTarget::Stdout) => {
// we asserted above that `OutputTarget::Stdout` is only permitted if getting a
// single hash and not a hashseq.
tracing::debug!("starting blobs read {}", hash);
let mut blob_read = iroh.blobs().read(hash).await?;
tokio::io::copy(&mut blob_read, &mut tokio::io::stdout()).await?;
tracing::debug!("finished blobs read {}", hash);
}
Some(OutputTarget::Path(path)) => {
let absolute = std::env::current_dir()?.join(&path);
Expand Down
3 changes: 3 additions & 0 deletions iroh/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,16 +331,19 @@ impl<D: iroh_blobs::store::Store> NodeInner<D> {
}

// Abort rpc tasks.
debug!("shutting down RPC tasks ({})", rpc_join_set.len());
rpc_join_set.shutdown().await;

self.shutdown(protocols).await;

// Abort remaining tasks.
debug!("shutting down remaining tasks ({})", join_set.len());
join_set.shutdown().await;
}

/// Shutdown the different parts of the node concurrently.
async fn shutdown(&self, protocols: Arc<ProtocolMap>) {
debug!("shutting down node");
let error_code = Closed::ProviderTerminating;

// Shutdown future for the docs engine, if enabled.
Expand Down

0 comments on commit 488d163

Please sign in to comment.