curl-library
dead connections are not cleaned up on new requests
Date: Thu, 19 Jun 2014 16:58:55 +0200
Hi
I've realized that dead/half-open connections (that are in the TIME_WAIT
state) in the connection cache are not cleaned up (closed) when new
requests are triggered. In fact they are only cleaned up if a new
request to the same host is conducted. I tested this with quite recent
versions >=7.36.0 and git. In an earlier versions (e.g 7.28 I know it's
ancient) all dead connections where closed upon a new request.
I've found following post
http://curl.haxx.se/mail/lib-2009-03/0009.html, where exactly this
feature was submitted. There the whole connection cache was searched for
dead connections before a new request was conducted. But as far as I
understand the actual code in url.c::ConnectionExists() does no longer
iterate through all connections, and so does not check for dead
connections anymore.
Is there another way to get rid of the half-open connections, or is this
a bug?
Btw: My code uses the multi interface with one easy handle that is
reused (reset) for each request. Similar to the multi-single example.
cheers Frank
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-06-19