mirror of
https://github.com/NixOS/nix
synced 2025-07-03 02:01:48 +02:00
Increase the sleep time between download retries
This commit is contained in:
parent
97b1af1cbe
commit
6631a6e1a1
3 changed files with 4 additions and 2 deletions
|
@ -230,7 +230,7 @@ struct CurlDownloader : public Downloader
|
|||
} catch (DownloadError & e) {
|
||||
attempt++;
|
||||
if (e.error != Transient || attempt >= options.tries) throw;
|
||||
auto ms = 25 * (1 << (attempt - 1));
|
||||
auto ms = options.baseRetryTimeMs * (1 << (attempt - 1));
|
||||
printMsg(lvlError, format("warning: %s; retrying in %d ms") % e.what() % ms);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(ms));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue