changeset 15691:da8b9aa5e6d1

8085049: java/net/MulticastSocket/TimeToLive.java fails intermittently with "Address already in use" Reviewed-by: chegar
author xiaofeya
date Fri, 23 Sep 2016 03:15:00 -0700
parents 83030d149c5c
children 986468d1a0a4
files test/java/net/MulticastSocket/TimeToLive.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/net/MulticastSocket/TimeToLive.java	Fri Sep 23 01:08:24 2016 +0000
+++ b/test/java/net/MulticastSocket/TimeToLive.java	Fri Sep 23 03:15:00 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
     static int[] bad_ttls = { -1, 256 };
 
     public static void main(String[] args) throws Exception {
-        MulticastSocket socket = new MulticastSocket(6789);
+        MulticastSocket socket = new MulticastSocket();
         int ttl = socket.getTimeToLive();
         System.out.println("default ttl: " + ttl);
         for (int i = 0; i < new_ttls.length; i++) {