am 3291a3a1: am 45b98832: Merge "Fix URLConnectionTest#testConnectTimeouts."

* commit '3291a3a1b8e9331d85985c630189a10db9bee279':
  Fix URLConnectionTest#testConnectTimeouts.
diff --git a/luni/src/test/java/libcore/java/net/URLConnectionTest.java b/luni/src/test/java/libcore/java/net/URLConnectionTest.java
index d39e39f..be549ed 100644
--- a/luni/src/test/java/libcore/java/net/URLConnectionTest.java
+++ b/luni/src/test/java/libcore/java/net/URLConnectionTest.java
@@ -1641,9 +1641,12 @@
      * addresses. This is typically one IPv4 address and one IPv6 address.
      */
     public void testConnectTimeouts() throws IOException {
-        StuckServer ss = new StuckServer(false);
+        StuckServer ss = new StuckServer(true);
         int serverPort = ss.getLocalPort();
-        URLConnection urlConnection = new URL("http://localhost:" + serverPort).openConnection();
+        String hostName = ss.getLocalSocketAddress().getAddress().getHostAddress();
+        URLConnection urlConnection = new URL("http://" + hostName + ":" + serverPort + "/")
+                .openConnection();
+
         int timeout = 1000;
         urlConnection.setConnectTimeout(timeout);
         long start = System.currentTimeMillis();