Skip to content

Commit

Permalink
delete Thread.sleep and InterruptedException
Browse files Browse the repository at this point in the history
  • Loading branch information
sendaoYan committed Jun 26, 2024
1 parent 23277ef commit 7b06dcf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/jdk/java/nio/channels/DatagramChannel/Loopback.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static void main(String[] args) throws Exception {
* IP_MULTICAST_LOOP enabled and disabled.
*/
static void test(ProtocolFamily family, InetAddress group, NetworkInterface ni)
throws IOException, InterruptedException
throws IOException
{
System.out.format("\n%s socket\n", family.name());
DatagramChannel dc;
Expand Down Expand Up @@ -163,9 +163,6 @@ static void test(ProtocolFamily family, InetAddress group, NetworkInterface ni)
if (src.mismatch(dst) != -1) {
System.out.println("src: " + src + "not equal to dst: " + dst);
dst.clear();
// We're not supposed to receive stray datagrams here,
// so respin with 3 full seconds as this shouldn't happen too often
Thread.sleep(3000);
continue;
}
if (sender != null) {
Expand Down

0 comments on commit 7b06dcf

Please sign in to comment.