Skip to content

Commit

Permalink
fix: fixed handling of download errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirevo committed Mar 12, 2024
1 parent cb4971a commit 6986a4e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/commands/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,7 @@ async fn download_file(
}
};

// TODO: this only handles panics, what about regular errors ?
while let Err(_err) = tokio::spawn(future()).await {
// dbg!(err);
}
tokio::spawn(future()).await??;

if let Some(bar) = maybe_bar.as_ref() {
bar.finish_and_clear();
Expand Down Expand Up @@ -456,10 +453,7 @@ async fn download_aggregate(
}
};

// TODO: this only handles panics, what about regular errors ?
while let Err(_err) = tokio::spawn(future()).await {
// dbg!(err);
}
tokio::spawn(future()).await??;

let Some(bar) = maybe_bar else {
continue;
Expand Down

0 comments on commit 6986a4e

Please sign in to comment.