diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2017-04-10T13·58+0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-10T13·58+0200 |
commit | 8945a0ea2cf58569c077aa45c6ac2c5fa8db1c2a (patch) | |
tree | c65d534da2c66ed6e7edcf3b13bfb69f73c24260 | |
parent | 53edb55588e362ee6aa8f6b436c6db6b0409b615 (diff) | |
parent | d1fdade75562d711ec62e9cdf953f2a6b0e891ce (diff) |
Merge pull request #1317 from copumpkin/nix-retry-write-error
Add CURLE_WRITE_ERROR as a transient error condition
-rw-r--r-- | src/libstore/download.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index d1f760fdc301..f8f578695033 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -300,6 +300,11 @@ struct CurlDownloader : public Downloader || httpStatus == 504 || httpStatus == 522 || httpStatus == 524 || code == CURLE_COULDNT_RESOLVE_HOST || code == CURLE_RECV_ERROR + + // this seems to occur occasionally for retriable reasons, and shows up in an error like this: + // curl: (23) Failed writing body (315 != 16366) + || code == CURLE_WRITE_ERROR + // this is a generic SSL failure that in some cases (e.g., certificate error) is permanent but also appears in transient cases, so we consider it retryable || code == CURLE_SSL_CONNECT_ERROR #if LIBCURL_VERSION_NUM >= 0x073200 |