From ee189f5c8111d001f5f8c1dfe8a313bfa4fae83f Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 17 Feb 2021 17:22:16 +0100 Subject: [PATCH] dnsdist: Remove redundant test in the TCP path --- pdns/dnsdist-tcp.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index ae81bbe082..5be27acea1 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -912,15 +912,13 @@ void IncomingTCPConnectionState::handleIO(std::shared_ptrd_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; } } } -- 2.47.3