Skip to content

Commit efbb490

Browse files
committed
Using wait for multiplexing over HTTP/1.x
When a large burst of DNS requests came in and the only HTTPS/2 connection was too many time in idle state, curl closes it and opens brand new connection for every single DNS request. Obviously later it will keep only 1 and close all the others. So it is better to wait for multiplexing. When testing this setting, the DNS query latency values did not raise.
1 parent 9cd830a commit efbb490

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/https_client.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static void https_fetch_ctx_init(https_client_t *client,
315315
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_WRITEFUNCTION, &write_buffer);
316316
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_WRITEDATA, ctx);
317317
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_MAXAGE_CONN, 300L);
318-
// FIXME: consider adding CURLOPT_PIPEWAIT
318+
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_PIPEWAIT, client->opt->use_http_version > 1);
319319
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_USERAGENT, "https_dns_proxy/0.3");
320320
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_FOLLOWLOCATION, 0);
321321
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_NOSIGNAL, 0);

0 commit comments

Comments
 (0)