Skip to content

Commit

Permalink
common: test: Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kohlschuetter committed Apr 2, 2024
1 parent 85acd4c commit e729443
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ public void testTCPLoopbackDirectBuffer() throws Exception {
private void runTestTCPLoopback(boolean direct) throws Exception {
final SocketAddress sa = new InetSocketAddress(InetAddress.getLoopbackAddress(), 0);

ServerSocketChannel ssc = ServerSocketChannel.open();

runTestSocketChannel("TCP-Loopback", sa, ssc, () -> SocketChannel.open(ssc.getLocalAddress()),
direct);
try (ServerSocketChannel ssc = ServerSocketChannel.open();
SocketChannel sc = SocketChannel.open(ssc.getLocalAddress())) {
runTestSocketChannel("TCP-Loopback", sa, ssc, () -> sc, direct);
}
}

@Test
Expand Down

0 comments on commit e729443

Please sign in to comment.