Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Net:FTP timeout handaling

by moklevat (Priest)
on Mar 13, 2008 at 14:22 UTC ( #673972=note: print w/ replies, xml ) Need Help??

in reply to Net:FTP timeout handaling

It would be easier to help if you posted an entire script, or a reduced test case that illustrates the problem.

Barring that, I would think that a timeout would occur when you construct the ftp connection, not when you issue dir(). If you invoke the connection as described in Net::FTP you should get an error message when the connection fails. You can also include Debug=>1 to have more information printed to stderr.

my $ftp = Net::FTP->new($hostname,Debug=>1) or die "Cannot connect to $hostname: $@";
Update:Although I might think that the timeout would occur at construction, I am apparently wrong. Sorry. With the updated information posted below and your code, it appears the problem is different that I had initially thought.

Comment on Re: Net:FTP timeout handaling
Select or Download Code
Replies are listed 'Best First'.
Re^2: Net:FTP timeout handaling
by kian.tern (Initiate) on Mar 13, 2008 at 14:44 UTC
    The timeouts occur when $ftp->dir() is processed.
    I see it in the debug output.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://673972]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2015-11-28 00:49 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (735 votes), past polls