RFR: 8278326: Socket close is not thread safe and other cleanup [v3]

Alan Bateman alanb at openjdk.org
Thu Jan 12 08:02:15 UTC 2023


On Wed, 11 Jan 2023 14:19:01 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>  It's a bit strange that shutdownInput() / shutdownOutput() are not protected by the same lock than close() but they were not before either.

Thanks for going through this. The shutdownXXX methods require the Socket to be connected so they don't create the SocketImpl or the underlying socket. It's okay for these methods to race with each other, or close, as it will be handled by the SocketImpl (NioSocketImpl).

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

PR: https://git.openjdk.org/jdk/pull/11863


More information about the net-dev mailing list