From 7a86a25f5b73b86455cd977572250de0a6124524 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 May 2020 12:35:18 +0200 Subject: [PATCH] connect: make happy eyeballs work for QUIC (again) Follow-up from dbd16c3e256c6c (regression in 7.70.0) Closes #5334 --- lib/connect.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/connect.c b/lib/connect.c index b67d17722f..1d26d7bc02 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -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