From bf20f487e52467587fe7cd56cd6dab00afbea7c4 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 21 Mar 2019 18:30:42 +0100 Subject: [PATCH] dnsdist: Fix outstanding count for TCP connections --- pdns/dnsdist-tcp.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index 78d45b219..35f7c19a8 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -341,6 +341,7 @@ public: if (d_ds != nullptr) { if (d_outstanding) { --d_ds->outstanding; + d_outstanding = false; } if (d_downstreamSocket) { @@ -870,6 +871,7 @@ static void handleDownstreamIOCallback(int fd, FDMultiplexer::funcparam_t& param ++state->d_downstreamFailures; if (state->d_outstanding && state->d_ds != nullptr) { --state->d_ds->outstanding; + state->d_outstanding = false; } iostate = IOState::Done; connectionDied = true; -- 2.40.0