RFR: 8256459: java/net/httpclient/ManyRequests.java and java/net/httpclient/LineBodyHandlerTest.java fail infrequently with java.net.ConnectException: Connection timed out: no further information [v2]

Daniel Fuchs dfuchs at openjdk.java.net
Wed Dec 9 18:55:37 UTC 2020


On Wed, 9 Dec 2020 17:23:19 GMT, Chris Hegarty <chegar at openjdk.org> wrote:

>> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8256459: java/net/httpclient/ManyRequests.java and java/net/httpclient/LineBodyHandlerTest.java fail infrequently with java.net.ConnectException: Connection timed out: no further information
>>   
>>   Connect will not be retried if retry connect is disabled
>>   JBS issue label noreg-self removed and bug id added to tests
>
> src/java.net.http/share/classes/jdk/internal/net/http/PlainHttpConnection.java line 205:
> 
>> 203:         }
>> 204:         return cf.handle((r,t) -> checkRetryConnect(r, t,exchange))
>> 205:                 .thenCompose(Function.identity());
> 
> So this changes behaviour so that a single subsequent additional TCP connection may be tried for all cases where the connection fails AND there is remaining connection deadline. Ok.

@ChrisHegarty I have modified the logic to not retry if `jdk.httpclient.disableRetryConnect` was specified. By default that property is not specified and so we will retry once, but if an application has specifically opted for not retrying on ConnectException then we will not retry.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1716


More information about the net-dev mailing list