[Ssh-sftp-perl-users] Trap connection errors somehow instead of just letting the whole script die.
Brought to you by:
dbrobins
From: Hans de G. <ha...@da...> - 2012-03-28 11:33:26
|
Hello list, I made a sftp script that should copy stuff from a to b. But some times during a session (lots of data) the script dies with: Connection failed: Connection reset by peer at /usr/lib/perl5/site_perl/5.8.8/Net/SFTP.pm line 568 But I need the script to keep running and detect these errors and try to reconnect and resume copyinf file. But it seems it's out of my hands? The script dies in the net::sftp module. Are there any config settings I could pass to net:sftp or maybe net::ssh? It is rather irritating the way it works now. The only work arround I could think of now is have my script call an other script that copies the files and when it dies I can see it in the output. But tracking whichs files have been copied is a lot harder this way. Regards, -- Hans de Groot <ha...@da...> |