Skip to content

Commit

Permalink
Merge branch 'main' into cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
de-sh committed Apr 4, 2024
2 parents 41c574f + 8192348 commit 91a8b8c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions uplink/src/collector/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,18 +228,19 @@ impl FileDownloader {
return Err(Error::Cancelled);
},

// NOTE: if download has timedout don't do anything, else ensure errors are forwarded after three retries
o = timeout_at(deadline, self.continuous_retry(state)) => match o {
Ok(r) => r?,
Err(_) => error!("Last download has timedout"),
},

_ = shutdown_rx.recv_async() => {
if let Err(e) = state.save(&self.config) {
error!("Error saving current_download: {e}");
}
}

return Ok(());
},

// NOTE: if download has timedout don't do anything, else ensure errors are forwarded after three retries
o = timeout_at(deadline, self.continuous_retry(state)) => match o {
Ok(r) => r?,
Err(_) => error!("Last download has timedout"),
}
}

state.current.meta.verify_checksum()?;
Expand Down

0 comments on commit 91a8b8c

Please sign in to comment.