FTP without timeout?
steve at holdenweb.com
Tue Oct 5 00:33:39 CEST 2004
> How do I setup an FTP connection without timeout using ftplib.FTP?
> I've tried
> ftp = ftplib.FTP('server')
> ftp.login('user', 'xxx')
> but it always timeout after 10 minutes of inactivity.
> The server allows idle up to 240 minutes before disconnecting.
> Please help! Thanks in advance.
at the start of your code to see whether this makes a difference. This
ensures that the socket timeout is established before a connection is
made to the remote endpoint.
Though frankly, from the documentation, since there doesn't appear to be
a default timeont on sockets, I'm not sure where this bizarre ten minute
timeout is coming from. The string "time" doesn't appear at all in the
ftplib source, so I'm somewhat stumped.
Are you sure the server doesn't require some sort of keepalive from the
Holden Web LLC +1 800 494 3119
More information about the Python-list