Skip to content

Commit 9cd830a

Browse files
committed
Fixing CURLOPT_MAXAGE_CONN
It was not working at all before. Better to get rid of TCP keepalive since it was not necessary. Raising curl requirement level because of option.
1 parent 52be098 commit 9cd830a

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ only makes sense if you trust your DoH provider.
4343

4444
## Build
4545

46-
Depends on `c-ares (>=1.11.0)`, `libcurl (>=7.64.0)`, `libev (>=4.25)`.
46+
Depends on `c-ares (>=1.11.0)`, `libcurl (>=7.65.0)`, `libev (>=4.25)`.
4747

4848
On Debian-derived systems those are libc-ares-dev,
4949
libcurl4-{openssl,nss,gnutls}-dev and libev-dev respectively.

src/https_client.c

+1-6
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,8 @@ static void https_fetch_ctx_init(https_client_t *client,
314314
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_POSTFIELDS, data);
315315
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_WRITEFUNCTION, &write_buffer);
316316
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_WRITEDATA, ctx);
317-
#ifdef CURLOPT_MAXAGE_CONN
318-
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_TCP_KEEPALIVE, 1L);
319-
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_TCP_KEEPIDLE, 50L);
320-
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_TCP_KEEPINTVL, 50L);
321317
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_MAXAGE_CONN, 300L);
322-
#endif
323-
// FIXME: consider adding usage of: CURLOPT_PIPEWAIT
318+
// FIXME: consider adding CURLOPT_PIPEWAIT
324319
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_USERAGENT, "https_dns_proxy/0.3");
325320
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_FOLLOWLOCATION, 0);
326321
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_NOSIGNAL, 0);

0 commit comments

Comments
 (0)