hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vjeran Marcinko" <vje...@tis.hr>
Subject Re: FIN_WAIT_2 connections
Date Mon, 08 Nov 2004 05:03:54 GMT
----- Original Message ----- 
From: "Oleg Kalnichevski" <olegk@apache.org>
To: "HttpClient User Discussion" <httpclient-user@jakarta.apache.org>
Sent: Sunday, November 07, 2004 11:40 PM
Subject: Re: FIN_WAIT_2 connections


> On Sun, 2004-11-07 at 19:26, Vjeran Marcinko wrote:
>
> > I'm not using HttpClient instance with multi-threaded connection
manager,
> > but default one and I instantiate new HttpClient during each HTTP POST
> > request.
>
> Don't. Do reuse the HttpClient instance, because every time you dispose
> HttpClient instance you are very likely to dispose an open connection
> along with it. I just recently had to explain why we strongly
> recommended using HttpClient as a singleton:
>
>
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=httpclient-user@jakarta.apache.org&msgNo=23

Ok, I get it now.
But if I send "Connection: close" header during each request, that means
connection should be closed upon each request completion, thus GC wouldn't
need to perform closing anyway if HttpClient instance is disposed ?

-Vjeran


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message