From: Remi Gacogne Date: Tue, 18 Oct 2022 13:46:19 +0000 (+0200) Subject: dnsdist: Properly handle the initial failure in 'lazy' mode X-Git-Tag: dnsdist-1.8.0-rc1~271^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7eea8eab6d675790967e15eaa4e3daf024cf7cc4;p=thirdparty%2Fpdns.git dnsdist: Properly handle the initial failure in 'lazy' mode --- diff --git a/pdns/dnsdistdist/dnsdist-backend.cc b/pdns/dnsdistdist/dnsdist-backend.cc index a93d36d01d..dd6886048f 100644 --- a/pdns/dnsdistdist/dnsdist-backend.cc +++ b/pdns/dnsdistdist/dnsdist-backend.cc @@ -612,6 +612,11 @@ void DownstreamState::submitHealthCheckResult(bool initial, bool newResult) infolog("Marking downstream %s as '%s'", getNameWithAddr(), newResult ? "up" : "down"); } setUpStatus(newResult); + if (newResult == false) { + auto stats = d_lazyHealthCheckStats.lock(); + stats->d_status = LazyHealthCheckStats::LazyStatus::Failed; + updateNextLazyHealthCheck(*stats); + } return; }