cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: Bug in the multi interface? (curl_multi_wait returns 0)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 18 Feb 2013 13:48:06 +0100 (CET)

On Fri, 15 Feb 2013, Clemens Gruber wrote:

> I created an example, which reproduces the problem:
> https://gist.github.com/clemensg/4960504
>
> With libcurl 7.28.1, it works as expected, but with 7.29.0, curl_multi_wait
> sets numfds to 0 and the URLs don't get fetched.

This is due to a faulty assumption on your behalf, possibly induced by not
having this explained properly in the man page.

The difference you see between the two versions is probably there because you
have built them with different resolver backends - or just that the code paths
are a little bit different between the versions.

The thing is that curl_multi_wait() can very well return zero 'numfds' without
that being a problem - that's also why it returns OK for that situation. In
some cases libcurl simply doesn't have any file descriptors to wait on and
then it can't return any with activity.

I can repeat this scenario with using the threaded resolver but it does not
happen when I build with c-ares instead.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-18