From: Remi Gacogne Date: Wed, 14 Dec 2022 15:10:49 +0000 (+0100) Subject: dnsdist: Fix the health-check timeout computation for DoH backend X-Git-Tag: dnsdist-1.8.0-rc1~160^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12327%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Fix the health-check timeout computation for DoH backend The remaining milliseconds after handling the full seconds was not properly converted to microseconds. --- diff --git a/pdns/dnsdistdist/dnsdist-tcp-downstream.hh b/pdns/dnsdistdist/dnsdist-tcp-downstream.hh index 939e6a041a..c966f823c7 100644 --- a/pdns/dnsdistdist/dnsdist-tcp-downstream.hh +++ b/pdns/dnsdistdist/dnsdist-tcp-downstream.hh @@ -156,7 +156,7 @@ protected: struct timeval res = now; res.tv_sec += d_ds->d_config.checkTimeout / 1000; /* ms to s */ - res.tv_usec += (d_ds->d_config.checkTimeout % 1000) / 1000; /* remaining ms to µs */ + res.tv_usec += (d_ds->d_config.checkTimeout % 1000) * 1000; /* remaining ms to µs */ return res; }