multi_done: prune DNS cache

Prune the DNS cache immediately after the dns entry is unlocked in
multi_done. Timed out entries will then get discarded in a more orderly
fashion.

Test506 is updated

Reported-by: Oleg Pudeyev

Fixes #2169
Closes #2170
This commit is contained in:
Daniel Stenberg 2017-12-09 23:50:05 +01:00
parent 06a0a26fb6
commit e959f16c5f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 55 additions and 48 deletions

View file

@ -552,6 +552,7 @@ static CURLcode multi_done(struct connectdata **connp,
Curl_resolv_unlock(data, conn->dns_entry); /* done with this */
conn->dns_entry = NULL;
}
Curl_hostcache_prune(data);
/* if the transfer was completed in a paused state there can be buffered
data left to free */