diff options
Diffstat (limited to 'perl-install/ftp.pm')
-rw-r--r-- | perl-install/ftp.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm index c1b93fec4..350619c23 100644 --- a/perl-install/ftp.pm +++ b/perl-install/ftp.pm @@ -56,3 +56,14 @@ sub getFile($) { $$retr->close if $$retr; $$retr = $ftp->retr(install_any::relGetFile($f)); } + +sub rewindGetFile() { + #- close any existing connection. + foreach (values %hosts) { + my ($ftp) = @{$_ || []}; + $ftp->close() if $ftp; + } + + #- make sure to reconnect to server. + %hosts = (); +} |