On Sun, 2021-08-22 at 18:22 +0530, Jaikiran Pai wrote:
> Hello Oleg,
> 
> On 22/08/21 6:16 pm, Oleg Kalnichevski wrote:
> > ...
> > Hi Jaikiran
> > 
> > I am not entirely sure what we can do here. HttpClient 4.x is Java
> > 1.6
> > compatible and therefore we can use neither Java 11 nor Java 16 API
> > directly. The easiest way to address the problem is by using a
> > custom
> > HttpRequestRetryHandler with Java 16 specific logic.
> 
> Could the org.apache.http.impl.client.DefaultHttpRequestRetryHandler 
> perhaps treat both the ConnectException and the
> NoRouteToHostException 
> the same way? What I mean is, by default, perhaps add 
> NoRouteToHostException to the set of exception types for which
> retries 
> aren't attempted, just like the ConnectException (along with few
> others) 
> that are currently added in DefaultHttpRequestRetryHandler[1]. That 
> would then treat both these exceptions the same way across JDK
> versions.
> 
> 
> [1] 
> https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java#L102
> 
> -Jaikiran
> 

My bad. I thought NoRouteToHostException was a new exception type
introduced in Java 16. Please feel free to raise a PR at GitHub with
proposed changes.

Cheers

Oleg



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

Reply via email to