[jdk17u-dev] RFR: 8358764: (sc) SocketChannel.close when thread blocked in read causes connection to be reset (win) [v2]

Alan Bateman alanb at openjdk.org
Tue Oct 28 10:19:16 UTC 2025


On Tue, 28 Oct 2025 10:02:01 GMT, Goetz Lindenmaier <goetz 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.

>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.

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

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/4076#issuecomment-3455669609


More information about the jdk-updates-dev mailing list