cURL / Mailing Lists / curl-library / Single Mail


RE: Timer left at 0 and firing over and over. Regression after 7.32.0

From: Daniel Stenberg <>
Date: Sat, 22 Mar 2014 21:36:09 +0100 (CET)

On Thu, 20 Mar 2014, Damian Lezama wrote:

> [Damian] It means I received at some point a timeout callback with value 0,
> but when I called curl_multi_perform, I received no timeout callback, so the
> timeout value was "left" as 0. As I call curl_multi_perform and nothing
> happens, the timeout value is still 0, so my loop doesn't wait, it calls
> again, and again... And this consumes 100% cpu.

Once the timeout expires, you call libcurl and that's it. That was the timeout
and it should not be called again. You shouldn't assume that libcurl will tell
you anything about it more than so.

If there's another timeout to deal with, then libcurl will tell you again with
an updated and new timeout value.

>> Any chance you can dumb down the code as much as possible in order to get a
>> recipe that is as simple as possible for me/us to try?
> [Damian] Let me see what I can do. As I said my code works fine in 7.32.0, but
> when trying 7.35.0 I enter in this cpu-hoging loop when I do not get the timeout
> callback from curl_multi_perform. If curl_multi_perform did nothing, I'd expect it
> to at least program the timer to something else, -1 for off or some reasonable
> value for whatever is happening.

That's not how it works though!

List admin:
Received on 2014-03-22