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();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SFTP::Foreign timeout value is inaccurate
by salva (Canon) on Mar 15, 2014 at 07:33 UTC | |
|
Re: Net::SFTP::Foreign timeout value is inaccurate
by jfroebe (Parson) on Mar 14, 2014 at 20:21 UTC | |
by salva (Canon) on Mar 15, 2014 at 09:23 UTC |