From: Remi Gacogne Date: Tue, 16 Jul 2019 07:59:14 +0000 (+0200) Subject: dnsdist: Fix timeout handling when reusing an IDS from DoH X-Git-Tag: dnsdist-1.4.0-rc1~38^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07b66264266ed5e82fd38ab5e61a84010c103b7d;p=pdns dnsdist: Fix timeout handling when reusing an IDS from DoH --- diff --git a/pdns/dnsdistdist/doh.cc b/pdns/dnsdistdist/doh.cc index c3c93511f..021578a15 100644 --- a/pdns/dnsdistdist/doh.cc +++ b/pdns/dnsdistdist/doh.cc @@ -246,16 +246,17 @@ static int processDOHQuery(DOHUnit* du) if (oldFD < 0) { // if we are reusing, no change in outstanding ++ss->outstanding; + /* either it was already -1 so no DOH unit to handle, + or someone handled it before us */ + oldDU = nullptr; } else { ++ss->reuseds; ++g_stats.downstreamTimeouts; - /* origFD is not -1 anymore, we can't touch it */ - oldDU = nullptr; + ids->du = nullptr; + handleDOHTimeout(oldDU); } - handleDOHTimeout(oldDU); - ids->du = du; ids->cs = &cs;