cURL / Mailing Lists / curl-library / Single Mail


Re: Curl_done() is broken for pipelined connections

From: Daniel Stenberg <>
Date: Sun, 27 Jan 2008 23:35:01 +0100 (CET)

On Sun, 27 Jan 2008, Dmitry Kurochkin wrote:

> Can we just remove bits.done? What so bad happens if we call Curl_done()
> multiple times for the same connection?

Bad things will happen as you may see if you try - it frees and "unlocks"
resources that it has held for the sake of the request and it must not do them

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?

  Commercial curl and libcurl Technical Support:
Received on 2008-01-27