mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Try next server on resolver timeout
Instead of resending to the same server on the (dispatch) timeout in the
resolver, try the next server.
(cherry picked from commit 5466a48fc9)
This commit is contained in:
parent
773517960f
commit
095f634f48
1 changed files with 7 additions and 8 deletions
|
|
@ -8229,16 +8229,14 @@ rctx_timedout(respctx_t *rctx) {
|
|||
isc_time_now(&now);
|
||||
/* netmgr timeouts are accurate to the millisecond */
|
||||
if (isc_time_microdiff(&fctx->expires, &now) < US_PER_MS) {
|
||||
FCTXTRACE("stopped trying to make fetch happen");
|
||||
FCTXTRACE("query timed out; stopped trying to make "
|
||||
"fetch happen");
|
||||
} else {
|
||||
FCTXTRACE("query timed out; no response");
|
||||
FCTXTRACE("query timed out; trying next server");
|
||||
/* try next server */
|
||||
rctx->no_response = true;
|
||||
rctx->finish = NULL;
|
||||
if (!ISFORWARDER(rctx->query->addrinfo) ||
|
||||
fctx->fwdpolicy != dns_fwdpolicy_first)
|
||||
{
|
||||
rctx->resend = true;
|
||||
}
|
||||
rctx->next_server = true;
|
||||
}
|
||||
|
||||
rctx_done(rctx, rctx->result);
|
||||
|
|
@ -9948,10 +9946,11 @@ rctx_done(respctx_t *rctx, isc_result_t result) {
|
|||
fctx_cancelquery(&query, rctx->finish, rctx->no_response, false);
|
||||
|
||||
/*
|
||||
* If nobody's waiting for results, don't resend.
|
||||
* If nobody's waiting for results, don't resend or try next server.
|
||||
*/
|
||||
LOCK(&fctx->res->buckets[fctx->bucketnum].lock);
|
||||
if (ISC_LIST_EMPTY(fctx->events)) {
|
||||
rctx->next_server = false;
|
||||
rctx->resend = false;
|
||||
}
|
||||
UNLOCK(&fctx->res->buckets[fctx->bucketnum].lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue