On Mon, 12 Oct 2009, Frank Meier wrote:

I now liked to change that behavior, and didn't find a nice solution. First I wanted to remeber the sockets and then close it if I see that the socket has been closed by the peer. but this would bypass libcurl, and imho would be a hack. After further searching I've found a posting in this mailing list, dealing with a similiar problem: http://curl.haxx.se/mail/lib-2009-03/0009.html the patch included in this post removed all connections in close_wait before a new request

And that patch is merged into the main code since about that time.

but still there will be at least one (the last) connection, that will remain in close_wait state "forever".

So you're actually thinking it is worth adding an entirely new function and code in your app to call that function with some interval just to make sure there's a single socket being closed correctly?

I personally do not. I would rather prefer to see that scanning to be done possibly on some other event and not only when adding a new connection, so that the possibility that it gets discovered and closed increases but without adding anything new to the API and without doing the check too often.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to