]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Account for the health-check run time between two runs 12821/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 11 May 2023 13:07:01 +0000 (15:07 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 15 May 2023 12:54:54 +0000 (14:54 +0200)
commitd81e666599b1ec5558bfe8ef3fa25af3de33d4a9
tree63341d37862ea4392b1264c814eaec1df18d152b
parente5c78acae81cf69c1346417fc913f8b8273e2787
dnsdist: Account for the health-check run time between two runs

We used to wait one full second between every run, which only makes
sense if the runs are not taking a long time. But as soon as we have
at least one check timing out, the run is taking roughly the time
of the longest timeout configured, so after this commit we:
- do not wait at all if the last run took more than a full second
- wait one second minus the elapsed time of the last run otherwise

(cherry picked from commit 5b48dd1425dabbba7ab6758fe3ccf2b1410faef7)
pdns/dnsdist.cc