Re: [Ssh-sftp-perl-users] Can I test for connection reset and also supress warnings
Brought to you by:
dbrobins
From: Heiko J. <ja...@hb...> - 2008-07-30 21:26:00
|
Am Mittwoch, den 30.07.2008, 16:48 -0400 schrieb Steve Comrie: > I could give that a shot, but it appears that there isn't one > particular "problematic" method call. It's just when the remote server > disconnects me, the entire script goes ends with an error. It could be > right in the middle of a file transfer. It I wrapped the entire thing > in an eval block, it would be a bit of a pain to try and figure out > where in my nested loop I was when the connection dropped and would > most likely have to just start the entire process over again. Well, you should probably use many eval blocks then - one for each method call. Checking if something went wrong is usually mandatory, but I agree that dying instead of reporting errors is a bit harsh. > Which is sort of what I've resorted to doing, I was just hoping there > was a way to have Net::SFTP tell me when it dropped connection as > opposed to just "dying". None that I know of. But I'm not an expert for that module. > Do you know if there is a simple way to prevent attempting to perform > fsetstat on a put? No. However, that only means: "I don't know one" and not "there is none". I'm afraid that I won't be of any help with these problems. The only other suggestion I could make would be that you could give Net::SSH2 (which comes with SFTP support by itself) a try. Good luck ;-) Heiko |