| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
RE: cleanup half closed sockets in connection cache
From: Frank Meier <f.meier_at_phion.com>
Date: Wed, 14 Oct 2009 11:13:19 +0200
-----Original Message-----
On Mon, 12 Oct 2009, Frank Meier wrote:
> I now liked to change that behavior, and didn't find a nice solution. First
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
So you're actually thinking it is worth adding an entirely new function and
I personally do not. I would rather prefer to see that scanning to be done
-- / daniel.haxx.se > 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 think there should be a possibility to handle this problem, even it it not a big one. Btw in our case we have an application with a lot of handler child processes, which leads to a lot of half open connections in the system (seen with netstat for example). Nevertheless I see your point, having an extra API call to handle this seems to be a not really generic approach. Another idea came to my mind, if it might be possible to use the curl_multi_socket_action() call to tell libcurl that something has happened on a socket under its control, and then lib curl checks the state of the socket and closes it if its half open. I tried this out, with no effect: I suppervised the socket in my application (poll) and then called curl_multi_socket_action(). I haven't had time to go any further in this direction (check libcurl code etc) but maybe this would be possible with a small modification. What do you think of that? cheers Franky ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2009-10-14 These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info