mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:33:38 +03:00
test dnsd: implement delayed responses
Add "Delay-A: ms", "Delay-AAAA: ms" and "Delay-HTTPS: ms" to the test dnsd config and implement delayed response handling. Add test_21_09 and test_21_10 to check that delayed responses connect using the undelayed address family. Closes #21299
This commit is contained in:
parent
bcd94e2750
commit
86f1e5b3f6
7 changed files with 277 additions and 50 deletions
|
|
@ -855,16 +855,17 @@ CURLcode config2setopts(struct OperationConfig *config,
|
|||
if(result)
|
||||
return result;
|
||||
|
||||
#ifndef DEBUGBUILD
|
||||
/* On most modern OSes, exiting works thoroughly,
|
||||
we clean everything up via exit(), so do not 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)
|
||||
return result;
|
||||
if(TRUE
|
||||
#ifdef DEBUGBUILD
|
||||
&& getenv("CURL_QUICK_EXIT")
|
||||
#endif
|
||||
) {
|
||||
/* QUICK_EXIT allows for running threads to be detached and not
|
||||
* joined. Preferably in non-debug runs. */
|
||||
result = curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L);
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
|
||||
gen_trace_setopts(config, curl);
|
||||
|
||||
|
|
|
|||
|
|
@ -1917,9 +1917,15 @@ static CURLcode parallel_transfers(CURLSH *share)
|
|||
if(!s->multi)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
#ifndef DEBUGBUILD
|
||||
(void)curl_multi_setopt(s->multi, CURLMOPT_QUICK_EXIT, 1L);
|
||||
if(TRUE
|
||||
#ifdef DEBUGBUILD
|
||||
&& getenv("CURL_QUICK_EXIT")
|
||||
#endif
|
||||
) {
|
||||
/* QUICK_EXIT allows for running threads to be detached and not
|
||||
* joined. Preferably in non-debug runs. */
|
||||
(void)curl_multi_setopt(s->multi, CURLMOPT_QUICK_EXIT, 1L);
|
||||
}
|
||||
(void)curl_multi_setopt(s->multi, CURLMOPT_NOTIFYFUNCTION, mnotify);
|
||||
(void)curl_multi_setopt(s->multi, CURLMOPT_NOTIFYDATA, s);
|
||||
(void)curl_multi_setopt(s->multi, CURLMOPT_MAX_HOST_CONNECTIONS, (long)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue