curl / Mailing Lists / curl-library / Single Mail


Re: Wait for a response using curl_multi_wait

From: Richard Copley <>
Date: Fri, 23 Mar 2018 11:37:28 +0000

On 23 March 2018 at 08:43, Daniel Stenberg <> wrote:

> On Tue, 20 Mar 2018, Richard Copley wrote:
> I might have misunderstood you. If curl_multi_wait returns with numfds=0,
>> then there is no point trying to read the data.
> When curl_multi_wait() returns, you should call curl_multi_perform() no
> matter what numfds says though since there are also timeouts involved that
> aren't reflected in numfds.
> (Barring the busy-loop problem already being discussed that is.)

OK, thanks.

I'm getting a bit lost. My comment there was in reply to Eric, who said:

>I checked my own code, I don't
>wait inside such loop and actually use the waiting of curl_multi_wait for
all my internal
>timing needs. I never check numfds either and just proceed to
>This example isn't doing that so you don't see what happens. Maybe the
data is just there?

But I think the example [1] does call curl_multi_perform after every

In any case, I think what I said about "no point trying to read the
data" doesn't
make much sense, and I take it back.


Received on 2018-03-23