diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index fe594a2b96..d9c141f153 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -7943,6 +7943,9 @@ rctx_timedout(respctx_t *rctx) { fctx->timeout = true; fctx->timeouts++; + rctx->no_response = true; + rctx->finish = NULL; + now = isc_time_now(); /* netmgr timeouts are accurate to the millisecond */ if (isc_time_microdiff(&fctx->expires, &now) < US_PER_MS) { @@ -7953,8 +7956,6 @@ rctx_timedout(respctx_t *rctx) { } else { FCTXTRACE("query timed out; trying next server"); /* try next server */ - rctx->no_response = true; - rctx->finish = NULL; rctx->next_server = true; }