Commit 624f1295 authored by Bob Halley's avatar Bob Halley
Browse files

An fctx that is shutting down should not be in ADDRWAIT mode.

parent 63d8846b
...@@ -962,6 +962,7 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) { ...@@ -962,6 +962,7 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
/* /*
* The fetch is waiting for a name to be found. * The fetch is waiting for a name to be found.
*/ */
INSIST(!SHUTTINGDOWN(fctx));
fctx->attributes &= ~FCTX_ATTR_ADDRWAIT; fctx->attributes &= ~FCTX_ATTR_ADDRWAIT;
if (event->type == DNS_EVENT_ADBMOREADDRESSES) if (event->type == DNS_EVENT_ADBMOREADDRESSES)
want_try = ISC_TRUE; want_try = ISC_TRUE;
...@@ -1492,6 +1493,11 @@ fctx_doshutdown(isc_task_t *task, isc_event_t *event) { ...@@ -1492,6 +1493,11 @@ fctx_doshutdown(isc_task_t *task, isc_event_t *event) {
fctx->attributes |= FCTX_ATTR_SHUTTINGDOWN; fctx->attributes |= FCTX_ATTR_SHUTTINGDOWN;
/*
* An fctx that is shutting down is no longer in ADDRWAIT mode.
*/
fctx->attributes &= ~FCTX_ATTR_ADDRWAIT;
LOCK(&res->buckets[bucketnum].lock); LOCK(&res->buckets[bucketnum].lock);
INSIST(fctx->state == fetchstate_active || INSIST(fctx->state == fetchstate_active ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment