From: Remi Gacogne Date: Thu, 21 Mar 2019 17:30:42 +0000 (+0100) Subject: dnsdist: Fix outstanding count for TCP connections X-Git-Tag: dnsdist-1.4.0-alpha1~25^2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf20f487e52467587fe7cd56cd6dab00afbea7c4;p=pdns dnsdist: Fix outstanding count for TCP connections --- 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;