[jdk17u-dev] RFR: 8358764: (sc) SocketChannel.close when thread blocked in read causes connection to be reset (win) [v2]
Goetz Lindenmaier
goetz at openjdk.org
Wed Oct 29 06:52:15 UTC 2025
On Tue, 28 Oct 2025 10:17:02 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Hi @AlanBateman and Kieran Farrell,
>>
>> do you mind having a look at this?
>> The code patched by the original change in SocketChannelImpl.java
>> is not in 17. Do you think it is ok to include this in 17 along with
>> this change? It seems to be a fix independent of the loom change that added it.
>>
>> Thanks! Goetz.
>
>> Hi @AlanBateman and Kieran Farrell,
>>
>> do you mind having a look at this? The code patched by the original change in SocketChannelImpl.java is not in 17. Do you think it is ok to include this in 17 along with this change? It seems to be a fix independent of the loom change that added it.
>
> From a quick look then it seems okay. In sun.nio.ch.Net then shutdownWriteBeforeClose can be eagerly or lazily initialized, you've chosen to do it lazily which is okay.
>
> The split of the blocking/non-blocking code paths had several motivations, the issue is specific to the (less common) case of using a SocketChannel blocking mode so I think you've got it right.
Hi @AlanBateman, thanks for having a look!
-------------
PR Comment: https://git.openjdk.org/jdk17u-dev/pull/4076#issuecomment-3460084523
More information about the jdk-updates-dev
mailing list