RFR: Ensure vthread has connected to server [v2]

Miao Zheng github.com+20216587+miao-zheng at openjdk.java.net
Mon Sep 6 12:00:10 UTC 2021


On Mon, 6 Sep 2021 11:14:09 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Thanks for your review.
>> Do I need remove this? I think the following is duplicated with the check of "server.connectionCount() == 0"
>> 
>>     // server should have accepted one connection
>>     if (server.connectionCount() != 1)
>>         throw new RuntimeException("Expected 1 HTTP connection");
>
> We should keep it to checks that only one connection is established. The details on this are in sun.net.www.http.HttpClient where it makes a decision on whether to retry the HTTP request when interrupted. In this case, it should not retry.

Got it. Thanks for your answer.
I have changed this PR on your suggestion.

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

PR: https://git.openjdk.java.net/loom/pull/60


More information about the loom-dev mailing list