CURLOPT_QUICK_EXIT: don't wait for DNS thread on exit

Fixes #2975
Closes #9147
This commit is contained in:
Alexandre Ferrieux 2022-07-12 23:40:05 +02:00 committed by Daniel Stenberg
parent b473df52bb
commit 49798cac83
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 87 additions and 2 deletions

View file

@ -1237,6 +1237,15 @@ static CURLcode single_transfer(struct GlobalConfig *global,
use_proto = url_proto(per->this_url);
/* On most modern OSes, exiting works thoroughly,
we'll clean everything up via exit(), so don't bother with
slow cleanups. Crappy ones might need to skip this.
Note: avoid having this setopt added to the --libcurl source
output. */
result = curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L);
if(result)
break;
if(!config->tcp_nodelay)
my_setopt(curl, CURLOPT_TCP_NODELAY, 0L);