提交 03224c57 编写于 作者: C chegar

8006560: java/net/ipv6tests/B6521014.java fails intermittently

Reviewed-by: khazra, wetmore
上级 a9a95392
...@@ -95,14 +95,12 @@ public class B6521014 { ...@@ -95,14 +95,12 @@ public class B6521014 {
Socket sock; Socket sock;
ServerSocket ssock; ServerSocket ssock;
int port; int port;
int localport;
ssock = new ServerSocket(0); ssock = new ServerSocket(0);
ssock.setSoTimeout(100); ssock.setSoTimeout(100);
port = ssock.getLocalPort(); port = ssock.getLocalPort();
localport = port + 1;
sock = new Socket(); sock = new Socket();
sock.bind(new InetSocketAddress(sin, localport)); sock.bind(new InetSocketAddress(sin, 0));
try { try {
sock.connect(new InetSocketAddress(sin, port), 100); sock.connect(new InetSocketAddress(sin, port), 100);
} catch (SocketTimeoutException e) { } catch (SocketTimeoutException e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册