mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 12:13:20 -04:00
Shutdown the fetch context after canceling the last fetch
Currently, the fetch context will continue running even when the last fetch (response) has been removed from the context, so named can process and cache the answer. This can lead to a situation where the number of outgoing recursing clients exceeds the the configured number for recursive-clients. Be more stringent about the recursive-clients limit and shutdown the fetch context immediately after the last fetch has been canceled from that particular fetch context.
This commit is contained in:
parent
327b666c6d
commit
8bf311c769
1 changed files with 3 additions and 4 deletions
|
|
@ -11210,10 +11210,9 @@ dns_resolver_cancelfetch(dns_fetch_t *fetch) {
|
|||
isc_task_sendanddetach(&etask, ISC_EVENT_PTR(&event_fetchdone));
|
||||
}
|
||||
|
||||
/*
|
||||
* The fctx continues running even if no fetches remain;
|
||||
* the answer is still cached.
|
||||
*/
|
||||
if (ISC_LIST_EMPTY(fctx->events)) {
|
||||
fctx_shutdown(fctx);
|
||||
}
|
||||
UNLOCK(&res->buckets[fctx->bucketnum].lock);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue