cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: A couple of handles stuck in WAITDO state?

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

On Fri, 11 Jun 2010, johansen_at_opensolaris.org 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) {

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-12

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET