mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-05 09:32:05 -04:00
fix: nil: Stop the timer when canceling the last fetch
When canceling the last fetch, we also need to stop the fctx_expired timer from possibly firing between the fctx_shutdown() call and the fetch being actually destroyed along with the timer. Closes #5136 Merge branch '5136-stop-timer-when-canceling-last-fetch-9.18' into 'bind-9.18' See merge request isc-projects/bind9!9988
This commit is contained in:
commit
2c8d9c490c
1 changed files with 2 additions and 1 deletions
|
|
@ -1981,7 +1981,6 @@ fctx__done_detach(fetchctx_t **fctxp, isc_result_t result, const char *file,
|
|||
fctx->qmin_warning = ISC_R_SUCCESS;
|
||||
|
||||
fctx_cancelqueries(fctx, no_response, age_untried);
|
||||
fctx_stoptimer(fctx);
|
||||
|
||||
LOCK(&res->buckets[fctx->bucketnum].lock);
|
||||
FCTX_ATTR_CLR(fctx, FCTX_ATTR_ADDRWAIT);
|
||||
|
|
@ -4688,6 +4687,8 @@ fctx_shutdown(fetchctx_t *fctx) {
|
|||
* exit.
|
||||
*/
|
||||
if (fctx->state != fetchstate_init) {
|
||||
fctx_stoptimer(fctx);
|
||||
|
||||
FCTXTRACE("posting control event");
|
||||
cevent = &fctx->control_event;
|
||||
isc_task_sendto(fctx->res->buckets[fctx->bucketnum].task,
|
||||
|
|
|
|||
Loading…
Reference in a new issue