cURL / Mailing Lists / curl-library / Single Mail


Re: Busy looping bug in multi_socket interface

From: Daniel Stenberg <>
Date: Mon, 12 May 2008 23:50:43 +0200 (CEST)

On Mon, 12 May 2008, Christopher Palow wrote:

> If we have to fix it otherwise, I was thinking of breaking out of the
> timeout loop in multi_socket if we every try to call multi_runsingle on the
> same easy handle twice in a row. Or maybe bounding that loop to say 100
> iterations or something. In general in event loops you want to have bounded
> execution so we donšt starve other parts of the program (say non curl
> connections).

But when would it legitimately loop 100 iterations unless it has 100 transfers
that have time-out actions that need to be taken care of? And even so, 100
timeouts to deal with should imply at least 100 transfers (and most likely
many more than 100) which isn't that common.

And yes, I can see how limiting the loop can be useful and if we return
CURLM_CALL_MULTI_PERFORM in that case, I don't think we lose anything really
serious, except some resolution in some timer-based action and we don't have
any such that is timing-critical.

  Commercial curl and libcurl Technical Support:
Received on 2008-05-12