Skip to content

Commit

Permalink
fix: need not retry HTTP status errors (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi authored Mar 30, 2024
1 parent c477468 commit 893a719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uplink/src/collector/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl FileDownloader {
loop {
match self.download(req, &mut download).await {
Ok(_) => break,
Err(Error::Reqwest(e)) => error!("Download failed: {e}"),
Err(Error::Reqwest(e)) if !e.is_status() => error!("Download failed: {e}"),
Err(e) => return Err(e),
}
tokio::time::sleep(Duration::from_secs(1)).await;
Expand Down

0 comments on commit 893a719

Please sign in to comment.