hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Boniface <tho...@stickyads.tv>
Subject Cancel and socket state
Date Tue, 28 Jan 2014 17:00:56 GMT

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 ?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message