summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-12-08 16:20:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-12-08 16:20:43 +0000
commit6ac6f9c8f4ac26addeb432091d8213a90cb5d108 (patch)
treee5ff9dbeb8cfe593d64a26e9261367a1ea6055a7 /perl-install
parent3e548c1965333d11337ee4f94643d385da17ac1b (diff)
downloaddrakx-6ac6f9c8f4ac26addeb432091d8213a90cb5d108.tar
drakx-6ac6f9c8f4ac26addeb432091d8213a90cb5d108.tar.gz
drakx-6ac6f9c8f4ac26addeb432091d8213a90cb5d108.tar.bz2
drakx-6ac6f9c8f4ac26addeb432091d8213a90cb5d108.tar.xz
drakx-6ac6f9c8f4ac26addeb432091d8213a90cb5d108.zip
(new): retry in case of ftp connection/login
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ftp.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm
index a82729c6e..b1910df13 100644
--- a/perl-install/ftp.pm
+++ b/perl-install/ftp.pm
@@ -38,8 +38,14 @@ sub new {
$password = '-drakx@';
}
- my $ftp = Net::FTP->new(network::resolv($host), %options) or die '';
- $ftp->login($login, $password) or die '';
+ my $ftp;
+ while (1) {
+ $ftp = Net::FTP->new(network::resolv($host), %options) or die;
+ $ftp && $ftp->login($login, $password) and last;
+
+ log::l("login failed, sleeping before trying again");
+ sleep 10;
+ }
$ftp->binary;
$ftp->cwd($prefix);