cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: non-blocking FTP

From: Jeff Weber <jweber_at_amsc.com>
Date: Wed, 14 May 2008 16:41:34 -0500

On Wed, May 14, 2008 at 12:02:30PM -0700, Dan Fandrich wrote:
> On Wed, May 14, 2008 at 12:49:14PM -0500, Jeff Weber wrote:
> > Ok, I added read and progress callbacks that have timeout logic, and
> > can return abort values. In my tests, I upload the same file N times
> > through the same curl handle. I break the connection to the FTP
> > server randomly during the N file uploads. For some transfers, the
> > callbacks run and abort the transfer child thread (hooray!). For
> > other transfers, the callbacks never run, and the transfer hangs. If
> > I break the connection before running my test program, the callbacks
> > never run.
>
> "Never" or "so long that I gave up waiting"? Chances are, there is a long
> timeout of some sort occurring. If it's due to the nameserver lookup, you
> could reduce that by using c-ares for asynchronous lookups.
>
I've noticed 2 behaviors. Either the library starts running the progress
callback at approximately 1Hz, or no callback is invoked at all. I wait for
3 minutes. I use raw dotted quad IP addresses, not DNS names.

    Jeff
Received on 2008-05-14