Skip to content

Commit

Permalink
feat: log timeout of previous download
Browse files Browse the repository at this point in the history
  • Loading branch information
de-sh committed Jul 25, 2023
1 parent 0dcf988 commit be9d11a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions uplink/src/collector/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ impl FileDownloader {
};

// NOTE: if download has timedout don't do anything, else ensure errors are forwarded after three retries
if let Ok(Err(e)) = timeout(duration, self.retry_thrice(action)).await {
self.forward_error(e).await;
match timeout(duration, self.retry_thrice(action)).await {
Ok(Err(e)) => self.forward_error(e).await,
Err(_) => error!("Last download has timedout"),
_ => {}
}
}
}
Expand Down

0 comments on commit be9d11a

Please sign in to comment.