mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-28 17:46:40 -04:00
In resume_qmin check if the fetch context is already shutting down - if so, try to destroy it, don't continue
This commit is contained in:
parent
e9771830b8
commit
7c960e89ea
1 changed files with 6 additions and 3 deletions
|
|
@ -4102,7 +4102,6 @@ resume_qmin(isc_task_t *task, isc_event_t *event) {
|
|||
fetchctx_t *fctx;
|
||||
isc_result_t result;
|
||||
bool bucket_empty;
|
||||
bool locked = false;
|
||||
unsigned int bucketnum;
|
||||
unsigned int findoptions = 0;
|
||||
dns_name_t *fname, *dcname;
|
||||
|
|
@ -4135,6 +4134,11 @@ resume_qmin(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
dns_resolver_destroyfetch(&fctx->qminfetch);
|
||||
|
||||
if (SHUTTINGDOWN(fctx)) {
|
||||
maybe_destroy(fctx, false);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
* Note: fevent->rdataset must be disassociated and
|
||||
* isc_event_free(&event) be called before resuming
|
||||
|
|
@ -4217,8 +4221,7 @@ resume_qmin(isc_task_t *task, isc_event_t *event) {
|
|||
cleanup:
|
||||
INSIST(event == NULL);
|
||||
INSIST(fevent == NULL);
|
||||
if (!locked)
|
||||
LOCK(&res->buckets[bucketnum].lock);
|
||||
LOCK(&res->buckets[bucketnum].lock);
|
||||
bucket_empty = fctx_decreference(fctx);
|
||||
UNLOCK(&res->buckets[bucketnum].lock);
|
||||
if (bucket_empty)
|
||||
|
|
|
|||
Loading…
Reference in a new issue