cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: running_handles: less than zero ?

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Mon, 16 Oct 2006 12:49:34 -0500

Okay, I tried the curl_multi_dump thing, and when
I compare it to the app-side view of things, I see
(for example) Out of a total of 50 easy handles, 40
have completed successfully, and libcurl says the
other 10 are stuck in WAITRESOLVE, and the same 10
sockets on the application side have a libevent handler
set to look for EV_READ, but nothing is happening.

When I look at the same thing with tcpdump, I see the
50 dns requests and only 40 dns responses. Which accounts
for the 10 stalled connections, but for some reason the
libevent timer ends up not waiting on anything.
That is, evtimer_set() returns zero.

But I think maybe I found an answer to the problem:

If I tell the application to do a curl_multi_socket_all() loop
immediately after each curl_multi_remove_handle(), the problem
seems to go away.

Does that sound logical/reasonable/acceptable?

 - Jeff
Received on 2006-10-16