Just another Perl shrine | |
PerlMonks |
Net::SFTP::Foreign timeout value is inaccurateby wanderedinn (Sexton) |
on Mar 14, 2014 at 15:54 UTC ( [id://1078354]=perlquestion: print w/replies, xml ) | Need Help?? |
wanderedinn has asked for the wisdom of the Perl Monks concerning the following question: So, we have been using Net::SFTP::Foreign for some time now. It appeared to me that the timeout value was not accurate and I recently discovered an interesting issue. When I set a timeout value (which the docs indicate is seconds) my actual timeout is 4X the value I set. Thus, a timeout => 5 translates to 20 seconds. I've even tested timeout => 2.5 and sure enough, it times out in 10 seconds. Is this by design? I have googled and searched for references to this, but I don't see anyone with the same issue. my time testing method is pretty straight forward printf "before sftp: %s\n", scalar localtime(); my $ftp = Net::SFTP::Foreign->new(host=>"localhost", timeout => 2.5, port => 10022, user => "test", password => "test"); printf "after sftp: %s\n", scalar localtime();
Back to
Seekers of Perl Wisdom
|
|