Following up - maybe what I should do to implement a hard timeout is execute the request on a separate thread and if this thread is taking longer than the configured SO timeout I can call the abort() method on the HttpUriRequest object. Would that be my best choice?
On 1/16/15, 12:29 PM, "Michael Moores" <[email protected]> wrote: >I am seeing a situation where the HTTP transaction looks hung if I >experience a >degraded network. If the HTTP response data comes back very slowly the >socket timeout never gets triggered and >the thread can remain hung up. I verified this with a quick test, >controlling the server socket data rate. > >Is there a way in version 4.3.6 to ensure that the connection socket gets >shutdown if this happens? >I don¹t see that closeIdleConnections/closeExpiredConnections would help >when the connection is leased. > >I am using PoolingHttpClientConnectionManager/CloseableHttpClient. >What I need is an application layer timeout rather than a data link layer >timeout. > >Thanks, >Michael > > > >
