diff options
author | Graham Christensen <graham@grahamc.com> | 2019-08-07T19·14-0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2019-08-08T14·22-0400 |
commit | a02457db715a80de7630d823fd8d7230a4bd451f (patch) | |
tree | bbca88be36bf7216f032cb56440ca73f753faae7 /src/libstore/download.hh | |
parent | 1eeaf99cf89630f84b4a1b6882a0f98019725d9e (diff) |
conf: stalled-download-timeout: make tunable
Make curl's low speed limit configurable via stalled-download-timeout. Before, this limit was five minutes without receiving a single byte. This is much too long as if the remote end may not have even acknowledged the HTTP request.
Diffstat (limited to 'src/libstore/download.hh')
-rw-r--r-- | src/libstore/download.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/download.hh b/src/libstore/download.hh index 3b7fff3ba4cb..c68381846948 100644 --- a/src/libstore/download.hh +++ b/src/libstore/download.hh @@ -24,6 +24,9 @@ struct DownloadSettings : Config Setting<unsigned long> connectTimeout{this, 0, "connect-timeout", "Timeout for connecting to servers during downloads. 0 means use curl's builtin default."}; + Setting<unsigned long> stalledDownloadTimeout{this, 300, "stalled-download-timeout", + "Timeout (in seconds) for receiving data from servers during download. Nix cancels idle downloads after this timeout's duration."}; + Setting<unsigned int> tries{this, 5, "download-attempts", "How often Nix will attempt to download a file before giving up."}; }; |