hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: About releaseconnection method of version 3.1
Date Fri, 23 May 2008 09:25:35 GMT
On Fri, 2008-05-23 at 14:30 +0530, Laxmilal Menaria wrote:
> Hello,
> 
> We are using httpclient 3.1 library in our application and sending
> multiple request using Multiple threads. Releasing connection when the
> thread completes using httpmethod.releaseconnection() method.
> 
> But we encountered that the releaseconnection() method doesn't release
> the connection.

Laxmilal,

#releaseConnection() method is intended to return the connection back
to the connection manager. The connection manager per default will keep
persistent connections alive, which implies leaving the socket in the
established state.

>  All the connection are in Established state. So now we
> are tried httpmethod.abort() in place of
> httpmethod.releaseconnection(), We need your comments on it.
> 

Rather call #closeIdleConnections(0) method of the connection manager to
close persistent if you do not want them. #abort method is intended to
force-terminate connections. You should use it sparingly. 

Oleg

> Thanks,
> Laxmilal
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 


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


Mime
View raw message