]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Update pdns/dnsdistdist/dnsdist-healthchecks.cc 9275/head
authorNuitari <nuitari-github@nuitari.net>
Fri, 31 Jul 2020 13:45:59 +0000 (09:45 -0400)
committerGitHub <noreply@github.com>
Fri, 31 Jul 2020 13:45:59 +0000 (09:45 -0400)
Co-authored-by: Remi Gacogne <rgacogne+github@valombre.net>
pdns/dnsdistdist/dnsdist-healthchecks.cc

index ce79c3405b2d626f07c5638099cb5c9c54fa6a4f..6b78c3d3c4d53159528aa2f66d43c073202082ba 100644 (file)
@@ -60,7 +60,7 @@ void updateHealthCheckResult(const std::shared_ptr<DownstreamState>& dss, bool n
   if(newState != dss->upStatus) {
     warnlog("Marking downstream %s as '%s'", dss->getNameWithAddr(), newState ? "up" : "down");
 
-    if (newState && dss->reconnectOnUp) {
+    if (newState && (!dss->connected || dss->reconnectOnUp)) {
       newState = dss->reconnect();
 
       if (dss->connected && !dss->threadStarted.test_and_set()) {