From: Remi Gacogne Date: Thu, 14 Dec 2023 15:07:30 +0000 (+0100) Subject: dnsdist: Fix a bug in the TCP connection metrics X-Git-Tag: auth-4.9.0-alpha1~28^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3853d878e05592c6aa2c060453240db8ab98d760;p=thirdparty%2Fpdns.git dnsdist: Fix a bug in the TCP connection metrics Reported by Coverity as CID 410911: Logically dead code. --- diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index 0bbc9106ba..c15a14484d 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -984,7 +984,7 @@ void IncomingTCPConnectionState::handleExceptionDuringIO(const std::exception& e if (d_state == State::idle || d_state == State::waitingForQuery) { /* no need to increase any counters in that case, the client is simply done with us */ } - else if (d_state == State::doingHandshake || d_state != State::readingProxyProtocolHeader || d_state == State::waitingForQuery || d_state == State::readingQuerySize || d_state == State::readingQuery) { + else if (d_state == State::doingHandshake || d_state == State::readingProxyProtocolHeader || d_state == State::waitingForQuery || d_state == State::readingQuerySize || d_state == State::readingQuery) { ++d_ci.cs->tcpDiedReadingQuery; } else if (d_state == State::sendingResponse) {