Skip to content

Commit 75b3200

Browse files
committed
Fix curl signal handling conflict
- https_client.c: Set CURLOPT_NOSIGNAL to 1 to disable curl's internal signal handling and prevent interference with libev's signal watchers.
1 parent 3c7fd07 commit 75b3200

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/https_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static void https_fetch_ctx_init(https_client_t *client,
309309
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_PIPEWAIT, (long)(client->opt->use_http_version > 1));
310310
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_USERAGENT, "https_dns_proxy/0.4");
311311
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_FOLLOWLOCATION, 0L);
312-
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_NOSIGNAL, 0L);
312+
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_NOSIGNAL, 1L); // Disable curl's signal handling to avoid conflicts with libev
313313
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_TIMEOUT, client->connections > 0 ? 5L : 10L /* seconds */);
314314
// We know Google supports this, so force it.
315315
ASSERT_CURL_EASY_SETOPT(ctx, CURLOPT_SSLVERSION, (long)CURL_SSLVERSION_TLSv1_2);

0 commit comments

Comments
 (0)