8006560: java/net/ipv6tests/B6521014.java fails intermittently
authorchegar
Sun, 20 Jan 2013 09:37:51 +0000
changeset 15279 1821066bde82
parent 15278 e081d3f73b75
child 15280 d9e473e85f3c
8006560: java/net/ipv6tests/B6521014.java fails intermittently Reviewed-by: khazra, wetmore
jdk/test/java/net/ipv6tests/B6521014.java
--- a/jdk/test/java/net/ipv6tests/B6521014.java	Sat Jan 19 10:53:14 2013 -0500
+++ b/jdk/test/java/net/ipv6tests/B6521014.java	Sun Jan 20 09:37:51 2013 +0000
@@ -95,14 +95,12 @@
         Socket sock;
         ServerSocket ssock;
         int port;
-        int localport;
 
         ssock = new ServerSocket(0);
         ssock.setSoTimeout(100);
         port = ssock.getLocalPort();
-        localport = port + 1;
         sock = new Socket();
-        sock.bind(new InetSocketAddress(sin, localport));
+        sock.bind(new InetSocketAddress(sin, 0));
         try {
             sock.connect(new InetSocketAddress(sin, port), 100);
         } catch (SocketTimeoutException e) {