mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Also provide an option for setting the curl connection timeout
This commit is contained in:
parent
00d761016a
commit
7f74513b4e
2 changed files with 18 additions and 1 deletions
|
@ -451,6 +451,20 @@ flag, e.g. <literal>--option gc-keep-outputs false</literal>.</para>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
|
<varlistentry xml:id="conf-connect-timeout"><term><literal>connect-timeout</literal></term>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
|
||||||
|
<para>The timeout (in seconds) for establishing connections in
|
||||||
|
the binary cache substituter. It corresponds to
|
||||||
|
<command>curl</command>’s <option>--connect-timeout</option>
|
||||||
|
option.</para>
|
||||||
|
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
|
@ -44,7 +44,10 @@ my $userName = getpwuid($<) || $ENV{"USER"} or die "cannot figure out user name"
|
||||||
|
|
||||||
my $requireSignedBinaryCaches = ($Nix::Config::config{"signed-binary-caches"} // "0") ne "0";
|
my $requireSignedBinaryCaches = ($Nix::Config::config{"signed-binary-caches"} // "0") ne "0";
|
||||||
|
|
||||||
my $curlConnectTimeout = int($ENV{"NIX_CONNECT_TIMEOUT"} // 0);
|
my $curlConnectTimeout = int(
|
||||||
|
$Nix::Config::config{"untrusted-connect-timeout"} //
|
||||||
|
$Nix::Config::config{"connect-timeout"} //
|
||||||
|
$ENV{"NIX_CONNECT_TIMEOUT"} // 0);
|
||||||
|
|
||||||
|
|
||||||
sub addRequest {
|
sub addRequest {
|
||||||
|
|
Loading…
Reference in a new issue