diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-06-07T14·21+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-06-07T14·25+0200 |
commit | 5c06e5297d3e8660abfa238b7244d958237e54e8 (patch) | |
tree | c059a0add2018e23fa784c7309b53955e1830d73 | |
parent | 24a356bf71e8c75bc7dbf9b4a619552b4ebe873c (diff) |
download-from-binary-cache.pl: Respect $NIX_CONNECT_TIMEOUT
-rw-r--r-- | scripts/download-from-binary-cache.pl.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/download-from-binary-cache.pl.in b/scripts/download-from-binary-cache.pl.in index 332fe5ba5634..10444dc61bc8 100644 --- a/scripts/download-from-binary-cache.pl.in +++ b/scripts/download-from-binary-cache.pl.in @@ -59,6 +59,7 @@ sub addRequest { $curl->setopt(CURLOPT_USERAGENT, "Nix/$Nix::Config::version"); $curl->setopt(CURLOPT_NOBODY, 1) if $head; $curl->setopt(CURLOPT_FAILONERROR, 1); + $curl->setopt(CURLOPT_TIMEOUT, int($ENV{"NIX_CONNECT_TIMEOUT"} // 0)); if ($activeRequests >= $maxParallelRequests) { $scheduled{$curlId} = 1; |