diff options
Diffstat (limited to 'libs/libcurl/src/connect.c')
-rw-r--r-- | libs/libcurl/src/connect.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/libs/libcurl/src/connect.c b/libs/libcurl/src/connect.c index 651b7ff467..ac8d271d35 100644 --- a/libs/libcurl/src/connect.c +++ b/libs/libcurl/src/connect.c @@ -547,9 +547,11 @@ static CURLcode baller_start_next(struct Curl_cfilter *cf, {
if(cf->sockindex == FIRSTSOCKET) {
baller_next_addr(baller);
- /* If we get inconclusive answers from the server(s), we make
- * a second iteration over the address list */
- if(!baller->addr && baller->inconclusive && !baller->rewinded)
+ /* If we get inconclusive answers from the server(s), we start
+ * again until this whole thing times out. This allows us to
+ * connect to servers that are gracefully restarting and the
+ * packet routing to the new instance has not happened yet (e.g. QUIC). */
+ if(!baller->addr && baller->inconclusive)
baller_rewind(baller);
baller_start(cf, data, baller, timeoutms);
}
@@ -800,8 +802,10 @@ static CURLcode start_connect(struct Curl_cfilter *cf, }
else {
/* no user preference, we try ipv6 always first when available */
+#ifdef USE_IPV6
ai_family0 = AF_INET6;
addr0 = addr_first_match(remotehost->addr, ai_family0);
+#endif
/* next candidate is ipv4 */
ai_family1 = AF_INET;
addr1 = addr_first_match(remotehost->addr, ai_family1);
@@ -965,7 +969,17 @@ static CURLcode cf_he_connect(struct Curl_cfilter *cf, if(cf->conn->handler->protocol & PROTO_FAMILY_SSH)
Curl_pgrsTime(data, TIMER_APPCONNECT); /* we are connected already */
- Curl_verboseconnect(data, cf->conn, cf->sockindex);
+ if(Curl_trc_cf_is_verbose(cf, data)) {
+ struct ip_quadruple ipquad;
+ int is_ipv6;
+ if(!Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad)) {
+ const char *host, *disphost;
+ int port;
+ cf->next->cft->get_host(cf->next, data, &host, &disphost, &port);
+ CURL_TRC_CF(data, cf, "Connected to %s (%s) port %u",
+ disphost, ipquad.remote_ip, ipquad.remote_port);
+ }
+ }
data->info.numconnects++; /* to track the # of connections made */
}
break;
|