On 22 November 2012 15:35, Oleg Kalnichevski <[email protected]> wrote:

> On Thu, 2012-11-22 at 15:02 +0000, James Shaw wrote:
> > I've been looking at making my HttpClient interruptible.  To do this, I'm
> > creating my own SocketFactory and registering it in a SchemeRegistry.
>  But
> > I'm now having an issue where the request is being retried three times,
> > each time catching ClosedByInterruptException.
> >
> > I see that InterruptedIOException is already caught by
> > DefaultHttpRequestRetryHandler.  Should ClosedByInterruptException be
> > added, too?
>
> Hmm. As far as I understand ClosedByInterruptException can be thrown
> only when using NIO channels, which HttpClient does not make use of per
> default. Anyway, obviously in your particular case you should probably
> be using a custom  HttpRequestRetryHandler as well.
>
Yup, that's what I'm doing.  Out of interest, does HttpClient have any
support for interruptible sockets?  Does what I'm doing sound sane? :-)

Reply via email to