cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: running_handles: less than zero ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 13 Oct 2006 09:18:39 +0200 (CEST)

On Thu, 12 Oct 2006, Jeff Pohlmeyer wrote:

> I found an ugly workaround for my stalling problem: set up an independent
> timer that runs a curl_multi_socket_all loop unconditionally every fifteen
> seconds or so. That's certainly not an ideal solution, but at least it means
> the problem isn't an absolute show-stopper. I managed to get that
> local-proxy thing I mentioned earlier up an running, and so far it seems to
> be doing surprisingly well.

I've now added a curl_multi_dump() function that is available if you build
libcurl with CURLDEBUG defined. It prints out all sockets that all currently
active easy handles are using and it shows in what state they are - what
action(s) they have told the app to wait for.

I have a hard time to repeat this hang-problem in my end, so I'm not sure how
to track this down myself but I hope this can come handy for you to see if you
can detect anything suspicious.

I guess it would make the best sense if you could make your app keep track of
all the sockets (and their "actions") as well so that you could make a dump
from the app-side too.

> Also, thanks for merging the timer patch, mentioning me in the ChangeLog,
> and especially for not asking me to write the docs :-)

Open source is collboration! :-)

> I also noticed you added ghiper.c to curl/docs/examples. Here is a revised
> version that uses the timer callback....

Thanks, I've committed that!

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-10-13