cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Issue with Curb and closing connection

From: Emmanuel Pinault <seatmanu_at_gmail.com>
Date: Wed, 2 Sep 2009 11:01:50 -0700

IS there a different mailing list for this binding? I can always take
a look at the source code meanwhile ..

Emmanuel
On Sep 2, 2009, at 10:51 AM, Daniel Stenberg wrote:

> On Wed, 2 Sep 2009, Emmanuel Pinault wrote:
>
>> (1..100).each do |n|
>> curl = Curl::Easy.new("http://localhost:5000")
>> curl.headers["Connection"] = "Close"
>> curl.http_post("/test", "q=hello")
>> curl = nil
>> end
>> sleep 60
>>
>> I really like libcurl but the fact that it is not closing the
>> connection after an object is marked to nil.. then it causes all
>> those connection to be open until the ruby process finished...
>
> Someone who knows what this binding does under the hood would need
> to explain what this snippet actually does in libcurl lingo.
>
> Given your description I would guess that curl_easy_cleanup() is
> never called on the easy handle so the connection is kept alive.
>
> --
>
> / daniel.haxx.se
Received on 2009-09-02