jaikiran opened a new pull request #311:
URL: https://github.com/apache/httpcomponents-client/pull/311


   As discussed in the mailing list discussion here[1], the commit here 
includes `java.net.NoRouteToHostException` to the set of exception types, for 
which request retries are disabled by default. The commit also has a test case 
which reproduces the issue and verifies the fix.
   
   I had a look at the `java.net.SocketException` hieararchy. It has 
`BindException`, `ConnectException`, `NoRouteToHostException` and 
`PortUnreachableException` as its subclasses. The `BindException` is not 
relevant while connecting as a client. The `ConnectException` is already 
included in the default set of non-retriable exception types in this 
`DefaultHttpRequestRetryHandler` class. The `PortUnreachableException` is for 
ICMP port unreachable cases, so it isn't relevant in this flow. So that leaves 
only `NoRouteToHostException` which was missing from this set of non-retriable 
exception type. Adding this should thus make it behave similar like the 
`ConnectException` and cover the possible exception types.
   
   P.S: I haven't checked if a similar change is needed in 5.x versions of this 
library.
   
   [1] 
https://mail-archives.apache.org/mod_mbox/hc-httpclient-users/202108.mbox/%3C3362ac32-1ced-9aad-36d6-2e0e000168ff%40apache.org%3E


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to