FTP without timeout?

Chris chrisNOSPAM at spam.com
Mon Oct 4 09:22:55 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')
ftp.sock.settimeout(None)
or
ftp.sock.settimeout(3600)
or
ftp.sock.setblocking(True)
but it always timeout after 10 minutes of inactivity.
The server allows idle up to 240 minutes before disconnecting.

Please help! Thanks in advance.

Chris





More information about the Python-list mailing list