If SocketChannel.open(SocketAddress) is used to open a socket channel and it fails to establish a connection to the peer then it leaks a file descriptor or SOCKET:
{
SocketChannel sc = open();
sc.connect(remote);
return sc;
}
This needs to be fixed to close the socket channel if the connect fails.
{
SocketChannel sc = open();
sc.connect(remote);
return sc;
}
This needs to be fixed to close the socket channel if the connect fails.
- is blocked by
-
JDK-8334297 (so) java/nio/channels/SocketChannel/OpenLeak.java should not depend on SecurityManager
-
- Resolved
-