about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-02-21T15·04+0100
committerEelco Dolstra <edolstra@gmail.com>2017-02-21T15·04+0100
commit8b1b5f9a12d4b5196be791118c58ae253ba02d96 (patch)
tree45978dea859ed8bd4cddf8df29ea11db2dc6ecea
parent8d7c6644c592b7d7f31e23d8915f0b634c191dd3 (diff)
Handle CURLE_RECV_ERROR as a transient error
This fixes

  unable to download ‘https://cache.nixos.org/nar/077h8ji74y9b0qx7rjk71xd80vjqp6q5gy137r553jlvdlxdcdlk.nar.xz’: HTTP error 200 (curl error: Failure when receiving data from the peer)
-rw-r--r--src/libstore/download.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index 0ca41b15bf7d..25ccd7d0b526 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -273,7 +273,7 @@ struct CurlDownloader : public Downloader
                     httpStatus == 403 ? Forbidden :
                     (httpStatus == 408 || httpStatus == 500 || httpStatus == 503
                         || httpStatus == 504  || httpStatus == 522 || httpStatus == 524
-                        || code == CURLE_COULDNT_RESOLVE_HOST) ? Transient :
+                        || code == CURLE_COULDNT_RESOLVE_HOST || code == CURLE_RECV_ERROR) ? Transient :
                     Misc;
 
                 attempt++;