--- a/src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java Mon Apr 29 09:03:06 2019 +0100
+++ b/src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java Tue Apr 30 11:23:02 2019 +0100
@@ -911,7 +911,7 @@
this.state = ST_CLOSING;
assert fd != null && closer != null;
- // shutdown output when linger interval not set
+ // shutdown output when linger interval not set to 0
try {
var SO_LINGER = StandardSocketOptions.SO_LINGER;
if ((int) Net.getSocketOption(fd, SO_LINGER) != 0) {
--- a/test/jdk/java/net/SocketOption/OptionsTest.java Mon Apr 29 09:03:06 2019 +0100
+++ b/test/jdk/java/net/SocketOption/OptionsTest.java Tue Apr 30 11:23:02 2019 +0100
@@ -153,7 +153,9 @@
}
// connected socket
- try (ServerSocket ss = new ServerSocket(0)) {
+ try (ServerSocket ss = new ServerSocket()) {
+ var loopback = InetAddress.getLoopbackAddress();
+ ss.bind(new InetSocketAddress(loopback, 0));
try (Socket s1 = new Socket()) {
s1.connect(ss.getLocalSocketAddress());
try (Socket s2 = ss.accept()) {
--- a/test/jdk/java/net/ipv6tests/TcpTest.java Mon Apr 29 09:03:06 2019 +0100
+++ b/test/jdk/java/net/ipv6tests/TcpTest.java Tue Apr 30 11:23:02 2019 +0100
@@ -29,8 +29,8 @@
* @library /test/lib
* @build jdk.test.lib.NetworkConfiguration
* jdk.test.lib.Platform
- * @run main TcpTest
- * @run main/othervm -Djdk.net.usePlainSocketImpl TcpTest
+ * @run main TcpTest -d
+ * @run main/othervm -Djdk.net.usePlainSocketImpl TcpTest -d
*/
import java.net.*;