equal
deleted
inserted
replaced
135 private Socket newUdpSocket() throws IOException { |
135 private Socket newUdpSocket() throws IOException { |
136 return new Socket(InetAddress.getLoopbackAddress(), 8000, false); |
136 return new Socket(InetAddress.getLoopbackAddress(), 8000, false); |
137 } |
137 } |
138 |
138 |
139 private static void closeAll(Deque<Socket> sockets) throws IOException { |
139 private static void closeAll(Deque<Socket> sockets) throws IOException { |
140 sockets.forEach(s -> { |
140 Socket s; |
141 try { s.close(); } catch (IOException ignore) { } |
141 while ((s = sockets.poll()) != null) { |
142 }); |
142 s.close(); |
|
143 } |
143 } |
144 } |
144 } |
145 } |