summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLConfig.pm5
-rw-r--r--Master/tlpkg/TeXLive/TLDownload.pm5
2 files changed, 9 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm
index a892e6d44ea..114e912ab74 100644
--- a/Master/tlpkg/TeXLive/TLConfig.pm
+++ b/Master/tlpkg/TeXLive/TLConfig.pm
@@ -47,6 +47,7 @@ BEGIN {
%TLPDBOptions
%TLPDBSettings
%TLPDBConfigs
+ $NetworkTimeout
);
@EXPORT = @EXPORT_OK;
}
@@ -186,6 +187,10 @@ our %TLPDBSettings = (
our $WindowsMainMenuName = "TeX Live $ReleaseYear";
+#
+# timeout for network connections (wget, LWP) in seconds
+our $NetworkTimeout = 30;
+
1;
diff --git a/Master/tlpkg/TeXLive/TLDownload.pm b/Master/tlpkg/TeXLive/TLDownload.pm
index 81c1bebb87a..20aa86280e9 100644
--- a/Master/tlpkg/TeXLive/TLDownload.pm
+++ b/Master/tlpkg/TeXLive/TLDownload.pm
@@ -7,6 +7,7 @@
package TeXLive::TLDownload;
use TeXLive::TLUtils;
+use TeXLive::TLConfig;
use File::Temp qw/tempfile/;
my $svnrev = '$Revision$';
@@ -43,8 +44,10 @@ sub new
my $self = {};
my $ua = LWP::UserAgent->new(
agent => "texlive/lwp",
- keep_alive => 3,
+ # use LWP::ConnCache, and keep 1 connection open
+ keep_alive => 1,
env_proxy => 1,
+ timeout => $TeXLive::TLConfig::NetworkTimeout,
);
$self->{'ua'} = $ua;
$self->{'enabled'} = 1;