Subject: | no close command for sftp |
if ( $sftph = Net::SFTP->new($import->{HostName}, %params) ) {
PrintMessage ("Opened connection to $import->{HostName}");
# get all files if there are any
GetRemoteFiles($dbh, $sftph, $remotehome, $import, $import->{RemoteDir} );
#!!!How to close ? close($sftph;
PrintMessage ("Closed connection to $import->{HostName}");
If I don't close the connection every Net::SFTP->new will fork a new sftp-process Remotely.