diff options
author | Norbert Preining <preining@logic.at> | 2011-06-22 03:07:01 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2011-06-22 03:07:01 +0000 |
commit | 3ded90c611331926683e61f74fd37b68eb28089a (patch) | |
tree | aa4e335008786ddaf10b6dc23c717dc5872c5f43 /Master/tlpkg/TeXLive | |
parent | 8f9db83b6069d785b989d5cc4332db7c3e8812d4 (diff) |
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
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLConfig.pm | 5 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLDownload.pm | 5 |
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; |