cURL / Mailing Lists / curl-library / Single Mail


Re: A couple of handles stuck in WAITDO state?

From: Daniel Stenberg <>
Date: Sat, 12 Jun 2010 21:30:12 +0200 (CEST)

On Fri, 11 Jun 2010, wrote:

> I noticed that the progress callback doesn't get invoked from the WAITDO
> state.

Ouch. That is a separate bug. Shouldn't be too hard to fix. I'll take that
issue. I guess one way to adress it is like the patch below, although it might
be calling the function a little too often...

> I'm assuming that it would be best to have the timeout monitoring occur in
> the same thread of control that's calling Curl_multi_perform()?

Yes I believe so, as then it can easily just curl_multi_remove_handle() when
the time is up.

My first suggested progress callback patch:

diff --git a/lib/multi.c b/lib/multi.c
index 9abf339..f210dcf 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1528,6 +1528,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,

          multistate(easy, CURLM_STATE_COMPLETED);
+ else
+ Curl_pgrsUpdate(easy->easy_conn);
    } while(0);
    if((CURLM_STATE_COMPLETED == easy->state) && !easy->msg) {

List admin:
Received on 2010-06-12