mirror of
https://github.com/curl/curl.git
synced 2026-08-01 15:38:37 +03:00
async-threaded resolver: use ref counter
Allocate the data shared between a transfer and an aync resolver thread separately and use a reference counter to determine its release. Closes #16847
This commit is contained in:
parent
23dfb47595
commit
19226f9bb1
5 changed files with 140 additions and 102 deletions
|
|
@ -2086,10 +2086,8 @@ static CURLMcode state_resolving(struct Curl_multi *multi,
|
|||
dns = Curl_fetch_addr(data, hostname, conn->primary.remote_port);
|
||||
|
||||
if(dns) {
|
||||
#ifdef USE_CURL_ASYNC
|
||||
data->state.async.dns = dns;
|
||||
data->state.async.done = TRUE;
|
||||
#endif
|
||||
/* Tell a possibly async resolver we no longer need the results. */
|
||||
Curl_resolver_set_result(data, dns);
|
||||
result = CURLE_OK;
|
||||
infof(data, "Hostname '%s' was found in DNS cache", hostname);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue