From 3ded90c611331926683e61f74fd37b68eb28089a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 22 Jun 2011 03:07:01 +0000 Subject: add a configuration variable $TeXLive::TLConfig::NetworkTimeout and use it in TLDownload (maybe later also in TLUtils for wget) git-svn-id: svn://tug.org/texlive/trunk@23084 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLConfig.pm | 5 +++++ Master/tlpkg/TeXLive/TLDownload.pm | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'Master/tlpkg/TeXLive') 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; -- cgit v1.2.3