Integrated: 8358764: (sc) SocketChannel.close when thread blocked in read causes connection to be reset (win)
Alan Bateman
alanb at openjdk.org
Wed Jun 11 14:12:37 UTC 2025
On Mon, 9 Jun 2025 19:17:16 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> On Windows, if a platform thread is blocked in SocketChannel.read, and another thread closes the channel, then Windows abruptly closes the connection (RST). In releases prior to JDK 11, the connection was shutdown for writing before closing so the connection was closed gracefully, an unexpected behavior change
>
> implCloseBlockingMode is changed to shutdown the connection for writing on Windows, no change in behavior for other platforms.
This pull request has now been integrated.
Changeset: e5196fc2
Author: Alan Bateman <alanb at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/e5196fc24d2ec9e581af7803ac47036111fee029
Stats: 244 lines in 5 files changed: 227 ins; 1 del; 16 mod
8358764: (sc) SocketChannel.close when thread blocked in read causes connection to be reset (win)
Reviewed-by: jpai, vyazici
-------------
PR: https://git.openjdk.org/jdk/pull/25700
More information about the nio-dev
mailing list