Problem
src/download.rs defines:
const RETRY_ATTEMPTS: u8 = 4;
However, both download() and download_file() iterate with:
for _ in 1..RETRY_ATTEMPTS
Because Rust ranges exclude the upper bound, 1..4 only produces three iterations. As a result, the downloader performs at most three HTTP requests instead of the configured four attempts.
The retry logic currently applies to HTTP 404 responses; other errors return immediately.
Steps
The configured attempt count should match the number of HTTP requests made.
Possible Solution(s)
Use an inclusive range such as:
for attempt in 1..=RETRY_ATTEMPTS
or:
for _ in 0..RETRY_ATTEMPTS
The final error could also include the URL and the number of attempts made. The retry delay should not be applied after the final failed attempt.
Notes
No response
Fuelup version
Installed components
latest - Up to date
fuelup - Update available
Problem
src/download.rsdefines:However, both
download()anddownload_file()iterate with:for _ in 1..RETRY_ATTEMPTSBecause Rust ranges exclude the upper bound, 1..4 only produces three iterations. As a result, the downloader performs at most three HTTP requests instead of the configured four attempts.
The retry logic currently applies to HTTP 404 responses; other errors return immediately.
Steps
The configured attempt count should match the number of HTTP requests made.
Possible Solution(s)
Use an inclusive range such as:
for attempt in 1..=RETRY_ATTEMPTSor:
for _ in 0..RETRY_ATTEMPTSThe final error could also include the URL and the number of attempts made. The retry delay should not be applied after the final failed attempt.
Notes
No response
Fuelup version
fuelup 0.27.4Installed components