[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Timeout in FTP Operations

Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

Hi Brian,

If you set a timeout on FTP_conn() or FTP_open(), FTPAPI will remember that timeout value and use it as the timeout value for file transfers as well.

However, it doesn't appear to do any timeout checks when connecting to or accepting data channels. It only does the timeout checks on the initial control channel and on send/recv calls. Also, it written using blocking sockets with select() to detect timeouts, and that method isn't foolproof. It should be changed to either use non-blocking sockets (like HTTPAPI does) or to use signals.

Unfortunately I don't have time to work on it. (Though, I wish I did. FTPAPI and HTTPAPI are definitely more fun to work on than my job!)

On Tue, 26 Apr 2005, Brian Eckenrod wrote:

Apologies if this is in the archives, I tried to get to them today, but
the site seems to be down.

We are using the latest beta version of the API to do some file transfers.
We are using the timeout parameter on the FTP connection to trap if the
connection is never made and that works well.  What seems to be missing or
that I am overlooking is a timeout on the file transfer portions of the
API.  We've had a receive of a file hang a few times for no obvious reason
and the API never times out or errors, the job just seems to sit there
until someone notices it.

Is there something I am missing or something I could do to utilize a
timeout in the file transfer aspects of the API or perhaps across the
entire API on all operations so that if any of them take beyond x minutes
they fail and I can trap the error and react to it.

Thanks in advance for any help / insight.

This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr