Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2242be83c617
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7be1a07a451d
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 29, 2020

  1. Copy the full SHA
    48ddb8e View commit details
  2. Merge pull request #3335 from domenkozar/retry-429

    retry on HTTP status code 429
    edolstra authored Jan 29, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    dtzWill Will Dietz
    Copy the full SHA
    7be1a07 View commit details
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/libstore/download.cc
3 changes: 2 additions & 1 deletion src/libstore/download.cc
Original file line number Diff line number Diff line change
@@ -363,9 +363,10 @@ struct CurlDownloader : public Downloader
} else if (httpStatus == 401 || httpStatus == 403 || httpStatus == 407) {
// Don't retry on authentication/authorization failures
err = Forbidden;
} else if (httpStatus >= 400 && httpStatus < 500 && httpStatus != 408) {
} else if (httpStatus >= 400 && httpStatus < 500 && httpStatus != 408 && httpStatus != 429) {
// Most 4xx errors are client errors and are probably not worth retrying:
// * 408 means the server timed out waiting for us, so we try again
// * 429 means too many requests, so we retry (with a delay)
err = Misc;
} else if (httpStatus == 501 || httpStatus == 505 || httpStatus == 511) {
// Let's treat most 5xx (server) errors as transient, except for a handful: