From: Remi Gacogne Date: Mon, 31 Jan 2022 09:53:10 +0000 (+0100) Subject: dnsdist: Fix the health-check timeout for outgoing DoH connections X-Git-Tag: auth-4.7.0-alpha1~40^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68f77a91b7d4e712bc068c02e64097651a6f30a6;p=thirdparty%2Fpdns.git dnsdist: Fix the health-check timeout for outgoing DoH connections The health-check timeout is in milliseconds, contrary to the other ones that are in seconds. --- diff --git a/pdns/dnsdistdist/dnsdist-tcp-downstream.hh b/pdns/dnsdistdist/dnsdist-tcp-downstream.hh index f85fc36e5e..547d266b8a 100644 --- a/pdns/dnsdistdist/dnsdist-tcp-downstream.hh +++ b/pdns/dnsdistdist/dnsdist-tcp-downstream.hh @@ -151,7 +151,8 @@ protected: } struct timeval res = now; - res.tv_sec += d_ds->checkTimeout; + res.tv_sec += d_ds->checkTimeout / 1000; /* ms to s */ + res.tv_usec += (d_ds->checkTimeout % 1000) / 1000; /* remaining ms to µs */ return res; }