curl-library
RE: Lingering Connections?
Date: Fri, 3 Oct 2008 16:56:37 -0500
Thank you, closing the multi interface is what was necessary. I thought
removing the handles from the multi interface then shutting them down
individually was enough. I recreate the multi interface on demand now, and
it persists 5 seconds after not having any easy handles associated with it
before I clean it up again.
-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Friday, October 03, 2008 1:30 PM
To: libcurl development
Subject: RE: Lingering Connections?
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.seReceived on 2008-10-04