]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Apply suggestion from Charles-Henri's code review (thanks!) 13298/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 2 Oct 2023 17:58:43 +0000 (19:58 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 3 Oct 2023 08:16:50 +0000 (10:16 +0200)
pdns/dnsdistdist/dnsdist-nghttp2-in.cc

index 0302d536fee80fdb5381d533b721557877879b05..432e9f22c94d41a11ff9759f6595d2e5f977ea9f 100644 (file)
@@ -1198,7 +1198,7 @@ void IncomingHTTP2Connection::updateIO(IOState newState, const FDMultiplexer::ca
     if (newState == IOState::NeedRead) {
       /* use the idle TTL if the handshake has been completed (and proxy protocol payload received, if any),
          and we have processed at least one query, otherwise we use the shorter read TTL  */
-      if ((d_state == State::waitingForQuery || d_state == State::idle) && (d_queriesCount > 0 || d_currentQueriesCount)) {
+      if ((d_state == State::waitingForQuery || d_state == State::idle) && (d_queriesCount > 0 || d_currentQueriesCount > 0)) {
         ttd = getIdleClientReadTTD(now);
       }
       else {