On Wed, 3 Dec 2025 07:47:40 GMT, Alan Bateman <[email protected]> wrote:
> Invoking Socket.shutdownInput at around the same time that another thread > attempts to read or is blocked in read on the same Socket has always been > problematic on Windows. For virtual threads, the read may fail with a > SocketException exception like "A request to send or receive data was > disallowed because the socket had already been shut down in that direction > with a previous shutdown call". The change proposed here to change the > SocketImpl to handle the async shutdownInput and cause read to return -1. > > Tests for async shutdownInput and shutdownOutput are added to > BlockingSocketsOps. Some minor drive by clean-up to use a value source for > the tests that exercise both untimed and timed cases. Similar cleanup in > BlockingChannelOps as it tests the socket adapters doing both untimed and > timed reads. The existing test for async shutdown with platform threads is > migrated to JUnit as part of the change. > > Testing: tier1 + tier2, test repeat runs of the modified tests to ensure they > are stable. Thanks for quick review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28626#issuecomment-3606752964
