cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Lingering Connections?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 3 Oct 2008 20:30:01 +0200 (CEST)

On Fri, 3 Oct 2008, Alexis Oldroyd wrote:

You're top-posting again. Please stop that.

> The behavior I was getting was after using curl_easy_init, and using it for
> a request, after calling curl_easy_cleanup on it, there were STILL http
> connections open to the server.

Yes, as I tried to explain: when using the multi interface the connections are
held by the multi handle so closing the individual easy handles won't
necessarily close the individual connection(s).

> My goal with the pool was to keep the original curl options I was using and
> not use curl_easy_cleanup on a handle until a time delay, at which point I
> would set FORBID_REUSE on the socket and then call cleanup and remove it
> from my pool.

That won't work. FORBID_REUSE sets an option that gets applied on the
connection(s) the easy handle uses after the option has been set.

-- 
  / daniel.haxx.se
Received on 2008-10-03