8249812: java/net/DatagramSocket/PortUnreachable.java still fails intermittently with SocketTimeoutException
Alan Bateman
Alan.Bateman at oracle.com
Wed Jul 22 11:40:39 UTC 2020
On 22/07/2020 12:28, Daniel Fuchs wrote:
> Hi,
>
> Please find below a trivial fix for:
>
> 8249812: java/net/DatagramSocket/PortUnreachable.java still fails
> intermittently with SocketTimeoutException
> https://bugs.openjdk.java.net/browse/JDK-8249812
>
> webrev:
> http://cr.openjdk.java.net/~dfuchs/webrev_8249812/webrev.00/
>
> The main method has a retry logic that catches BindException,
> but that exception is swallowed by serverSend(). serverSend()
> should propagate that exception, as there is no point waiting
> for the DatagramPacket to arrive if it has not been sent.
Would it be simpler to just remove the try/catch? Also in the main
method, put a trace message when it catches BindException so that the
.jtr will record why it retries.
-Alan
More information about the net-dev
mailing list