]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
connect: make happy eyeballs work for QUIC (again)
authorDaniel Stenberg <daniel@haxx.se>
Mon, 4 May 2020 10:35:18 +0000 (12:35 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 4 May 2020 12:56:26 +0000 (14:56 +0200)
Follow-up from dbd16c3e256c6c (regression in 7.70.0)

Closes #5334

lib/connect.c

index b67d17722fbf4b0bf74f343fddc43e7e095a6b40..1d26d7bc02a530a88a4c74b17e1427e1abe54cd8 100644 (file)
@@ -873,8 +873,16 @@ CURLcode Curl_is_connected(struct connectdata *conn,
         conn->tempsock[i] = CURL_SOCKET_BAD;
         post_SOCKS(conn, sockindex, connected);
         connkeep(conn, "HTTP/3 default");
+        return result;
       }
-      return result;
+      /* should we try another protocol family? */
+      if(i == 0 && !conn->parallel_connect &&
+         (Curl_timediff(now, conn->connecttime) >=
+          data->set.happy_eyeballs_timeout)) {
+        conn->parallel_connect = TRUE; /* starting now */
+        trynextip(conn, sockindex, 1);
+      }
+      continue;
     }
 #endif