curl-library
Issue with Curb and closing connection
Date: Wed, 2 Sep 2009 10:38:56 -0700
Hi,
So I am executing the following code and while it is running and
waiting, I am noticing that none of the connection are being closed..
Is there a way to force the closing of the connection? I tried using
the headers as you can tell but still not working....
require 'rubygems'
require 'curb'
(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...
Thanks
Emmanuel
Received on 2009-09-02