mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8169246: java/net/DatagramSocket/ReportSocketClosed.java fails intermittently with BindException
Reviewed-by: chegar
This commit is contained in:
parent
f367eb8965
commit
33c9c89bf0
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -37,7 +37,7 @@ public class ReportSocketClosed {
|
||||||
byte[] array = {21,22,23};
|
byte[] array = {21,22,23};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
soc = new DatagramSocket(4001);
|
soc = new DatagramSocket(0);
|
||||||
sin = InetAddress.getLocalHost();
|
sin = InetAddress.getLocalHost();
|
||||||
soc.close();
|
soc.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue