]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Remove redundant test in the TCP path
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 17 Feb 2021 16:22:16 +0000 (17:22 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 2 Mar 2021 10:39:54 +0000 (11:39 +0100)
pdns/dnsdist-tcp.cc

index ae81bbe082d0d8c7dfc351925aa795e64f961e2b..5be27acea157c52ea963f0af7c07a8bfdf5a56f0 100644 (file)
@@ -912,15 +912,13 @@ void IncomingTCPConnectionState::handleIO(std::shared_ptr<IncomingTCPConnectionS
         if (!state->d_lastIOBlocked && state->active() && iostate == IOState::Done) {
           // if the query has been passed to a backend, or dropped, and the responses have been sent,
           // we can start reading again
-          if (!state->d_isXFR) {
-            if (state->canAcceptNewQueries(now)) {
-              state->resetForNewQuery();
-              iostate = IOState::NeedRead;
-            }
-            else {
-              state->d_state = IncomingTCPConnectionState::State::idle;
-              iostate = IOState::Done;
-            }
+          if (state->canAcceptNewQueries(now)) {
+            state->resetForNewQuery();
+            iostate = IOState::NeedRead;
+          }
+          else {
+            state->d_state = IncomingTCPConnectionState::State::idle;
+            iostate = IOState::Done;
           }
         }
       }