From: Remi Gacogne Date: Wed, 17 Feb 2021 16:22:16 +0000 (+0100) Subject: dnsdist: Remove redundant test in the TCP path X-Git-Tag: dnsdist-1.6.0-alpha2~11^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee189f5c8111d001f5f8c1dfe8a313bfa4fae83f;p=thirdparty%2Fpdns.git dnsdist: Remove redundant test in the TCP path --- 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; } } }