From d1fdade75562d711ec62e9cdf953f2a6b0e891ce Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Mon, 10 Apr 2017 09:28:44 -0400 Subject: Add CURLE_WRITE_ERROR as a transient error condition We've observed it failing downloads in the wild and retrying the same URL a few moments later seemed to fix it. --- src/libstore/download.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 -- cgit 1.4.1