From 5c06e5297d3e8660abfa238b7244d958237e54e8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 7 Jun 2013 16:21:48 +0200 Subject: [PATCH] download-from-binary-cache.pl: Respect $NIX_CONNECT_TIMEOUT --- scripts/download-from-binary-cache.pl.in | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/download-from-binary-cache.pl.in b/scripts/download-from-binary-cache.pl.in index 332fe5ba5..10444dc61 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;