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: Cancel and socket state
Date Wed, 29 Jan 2014 08:46:33 GMT
On Tue, 2014-01-28 at 18:00 +0100, Thomas Boniface wrote:
> Hi,
> 
> I am using an http async client to contact several endpoints in a row with
> the same process. In the context of my application I want to keep the
> global process under a certain time. Sometimes it happens some of the
> executes I triggered using the client did not respond before what I
> consider to be a reasonable time.
> 
> In such a case I used to call cancel on the Future object returned by the
> execute in order to free the socket used by this execute as soon as
> possible (as I don't need the response anymore). The thing is it appears
> that the socket is closed instead of being put back in the pool when I call
> the cancel (The socket appears in TIME_WAIT state when I use netstat
> whereas when there is no timeout the socket appears as ESTABLISHED).
> 
> Is this an expected behavior ?
> 
> Thanks,
> Thomas

Thomas,

What version of HttpAsyncClient are you using?  

Oleg 


---------------------------------------------------------------------
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