-
Bug
-
Resolution: Fixed
-
P3
-
18, 21
-
b06
java.net.Socket is not specified to be thread safe but it is required to support async close. If you create an unbound Socket and close it at around the time that another thread is binding, connecting, or anything else that creates the underlying socket then it can leak.
Related is that ServerSocket.implAccept can be overridden to provide the Socket to accept. Its behavior is unspecified when called with a Socket that isn't newly created/unbound and there are number of silly scenarios that can arise. This also needs to coordinated with Socket.close so that accept doesn't return a closed Socket that is connected to an underlying socket.
Related is that ServerSocket.implAccept can be overridden to provide the Socket to accept. Its behavior is unspecified when called with a Socket that isn't newly created/unbound and there are number of silly scenarios that can arise. This also needs to coordinated with Socket.close so that accept doesn't return a closed Socket that is connected to an underlying socket.
- duplicates
-
JDK-8276955 Revisit synchronization in Socket/ServerSocket classes.
-
- Closed
-