That's relying a bit too much on garbage-collection, which can happen at any time. You should never rely on garbage collection to clean up native resources, like open sockets, especially if you're concerned about such low level things as a CLOSE_WAIT state.
Thanks, Sam
Your're right.
Having said that ... it does seems odd that it was done this way and not noted on the documentation.
So bottom line is:
1) To implement HTTP/1.1 persistent connections, use a single HttpClient instance that is reused to execute HttpMethods. Assuming of course, that the HTTP response also does not have "Connection: close", then we have HTTP persistent connections.
2) In order __not__ to use HTTP/1.1 persistent connections, explicitly add "Connection: close" HTTP header, specially if a new instance of HttpClient is created everytime. Otherwise, one will run out of files descriptors and get "Too many open files" exception.
John
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]