diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-10-15 16:46:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-15 16:46:42 -0700 |
commit | 7c3c13cecf48219cdcb90dc0b5019686cdd88626 (patch) | |
tree | ea44361a7b8c061ec84ec29d88aa2c6a1c3ec07a /cli/tools | |
parent | 40b1c42138c47e89eefa859cd36a9e3d62541e7b (diff) |
fix(install): retry downloads of registry info / tarballs (#26278)
Fixes #26085.
Adds a basic retry utility with some defaults, starts off with a 100ms
wait, then 250ms, then 500ms
I've applied the retry in the http client, reusing an existing function,
so this also applies to retrying downloads of deno binaries in `upgrade`
and `compile`. I can make a separate function that doesn't retry so this
doesn't affect `upgrade` and `compile`, but it seemed desirable to have
retries there too, so I left it in.
Diffstat (limited to 'cli/tools')
-rw-r--r-- | cli/tools/upgrade.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs index 7f21e6649..b1b09d1a6 100644 --- a/cli/tools/upgrade.rs +++ b/cli/tools/upgrade.rs @@ -913,7 +913,7 @@ async fn download_package( // text above which will stay alive after the progress bars are complete let progress = progress_bar.update(""); let maybe_bytes = client - .download_with_progress(download_url.clone(), None, &progress) + .download_with_progress_and_retries(download_url.clone(), None, &progress) .await .with_context(|| format!("Failed downloading {download_url}. The version you requested may not have been built for the current architecture."))?; Ok(maybe_bytes) |