On Mon, 27 Apr 2026 16:07:19 GMT, Mikhail Yankelevich 
<[email protected]> wrote:

>> test/jdk/sun/net/www/protocol/https/HttpsURLConnection/CloseKeepAliveCached.java
>>  line 203:
>> 
>>> 201:             http.disconnect();
>>> 202:         } catch (IOException ioex) {
>>> 203:             if (sslServerSocket != null) {
>> 
>> Is there a reason for closing the server socket in the client thread? If 
>> not, `sslServerSocket` could be made local to `doServerSide()`
>
> This is only closing if error is encountered. Just in case. This seems to me 
> to be the easiest to read as well

I still don't see the reason for this. The server socket is created in a 
try-with-resources block and will close itself when it's ready. You've 
introduced extra complexity for no real gain.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23469#discussion_r3317956656

Reply via email to