cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl_done() is broken for pipelined connections

From: Dmitry Kurochkin <dmitry.kurochkin_at_gmail.com>
Date: Tue, 29 Jan 2008 13:22:50 +0300

2008/1/28, Daniel Stenberg <daniel_at_haxx.se>:
> On Mon, 28 Jan 2008, Dmitry Kurochkin wrote:
>
> >> What about adding a counter so that each Curl_do() increases a counter and
> >> Curl_done() decreases it so that the actual cleanup act is only done once
> >> it reaches zero again which then should be the last action in a pipeline?
> >
> > If server sends "Connection: close" we should close connection after this
> > response even if we have over requests in pipeline (and counter is not
> > zero).
>
> True, we just need to make sure that we don't do things twice that can't deal
> with it, or that we release any resource before the last user of it is done.
>
> > And do we need the counter at all? Can we use send_pipe + recv_pipe size
> > instead? If it is zero, then no requests are using this connection at the
> > moment, so we can cleanup.
>
> Yes, it seems totally reasonable to me.
>
> However, I feel that these changes are probably not at an end here, and they
> may also need some time to mature so I'll proceed and release 7.18.0 without
> this, and then we can work on getting the pipelining perfected for the next
> release...
>
> Release is due to happen tonight CET.

Congrats on the release!

Here is the patch for Curl_done(). Now darcs with libcurl pipelining
works pretty good for me! At least I can not make it fail :)

Regards,
  Dmitry

>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>

Received on 2008-01-29