cURL / Mailing Lists / curl-library / Single Mail


RE: curl_multi_fdset always returns -1 for maxfd

From: Daniel Stenberg <>
Date: Thu, 13 Nov 2014 11:07:38 +0100 (CET)

On Thu, 13 Nov 2014, Vishakha Vaidya wrote:

>> Is this not clear in the documentation and examples?
> The code I sent earlier is multi-single.c from doc/examples & my point is
> that the code hangs, if its used with libcurl, thats built with async
> enabled. What I need is, help in figuring out if I'm missing any build
> settings or curl options?

Yes, you've said so already and I'm providing some ideas on how to debug
what's exactly happening for you and why. This is not a known problem and
libcurl is used by a fair amount of users on a large amount of platforms,
including Windows.

The example should work *EXACTLY* as written, and there is to my knowledge no
way to build libcurl or set specific options that would destroy it to that

It doesn't matter if it was built to use async name resolves or not, the
example should still work. The only thing asynch name resolves brings to this
specific case is that it'll cause the maxfd == -1 case to occur while libcurl
built to do sync resolves will not return that.

> Are you saying that the problem in not reproducible on linux, built with
> async (C-ARES or THREADS)?

That's exactly what I'm saying and in fact already did say!

List admin:
Received on 2014-11-13