8031563: TEST_BUG: java/nio/channels/Selector/ChangingInterests.java failed once

Reviewed-by: alanb
This commit is contained in:
Michael Cui 2014-03-25 10:14:09 +00:00 committed by Alan Bateman
parent 6f3216994c
commit df046b387e

View File

@ -138,8 +138,10 @@ public class ChangingInterests {
ServerSocketChannel.open().bind(new InetSocketAddress(0));
final SocketChannel sc = SocketChannel.open();
sc.setOption(StandardSocketOptions.TCP_NODELAY, true);
sc.connect(new InetSocketAddress(lh, ssc.socket().getLocalPort()));
SocketChannel peer = ssc.accept();
peer.setOption(StandardSocketOptions.TCP_NODELAY, true);
sc.configureBlocking(false);