mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Only start stale refresh window when resuming
If we did not attempt a fetch due to fetch-limits, we should not start the stale-refresh-time window. Introduce a new flag DNS_DBFIND_STALESTART to differentiate between a resolver failure and unexpected error. If we are resuming, this indicates a resolver failure, then start the stale-refresh-time window, otherwise don't start the stale-refresh-time window, but still fall back to using stale data. (This commit also wraps some docstrings to 80 characters width)
This commit is contained in:
@@ -7560,7 +7560,15 @@ query_gotanswer(query_ctx_t *qctx, isc_result_t res) {
|
||||
/*
|
||||
* If serve-stale is enabled, query_usestale() already
|
||||
* set up 'qctx' for looking up a stale response.
|
||||
*
|
||||
* We only need to check if the query timed out or
|
||||
* something else has gone wrong. If the query timed
|
||||
* out, we will start the stale-refresh-time window.
|
||||
*/
|
||||
if (qctx->resuming && result == ISC_R_TIMEDOUT) {
|
||||
qctx->client->query.dboptions |=
|
||||
DNS_DBFIND_STALESTART;
|
||||
}
|
||||
return (query_lookup(qctx));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user