< prev index next >

test/jdk/java/net/Socket/UrgentDataTest.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -55,11 +55,11 @@
             UrgentDataTest test = new UrgentDataTest ();
             if (args.length == 0) {
                 test.listener = new ServerSocket (0);
                 test.isClient = true;
                 test.isServer = true;
-                test.clHost = "127.0.0.1";
+                test.clHost = InetAddress.getLoopbackAddress().getHostAddress();
                 test.clPort = test.listener.getLocalPort();
                 test.run();
             } else if (args[0].equals ("-server")) {
                 test.listener = new ServerSocket (0);
                 System.out.println ("Server listening on port " + test.listener.getLocalPort());
< prev index next >