]> granicus.if.org Git - pdns/commitdiff
healthChecksThread indentation fixed.
authorstutiredboy <stutiredboy@gmail.com>
Tue, 19 Jul 2016 03:08:55 +0000 (11:08 +0800)
committerstutiredboy <stutiredboy@gmail.com>
Tue, 19 Jul 2016 03:08:55 +0000 (11:08 +0800)
pdns/dnsdist.cc

index 1cf00bc1073fc915967e8771b6132433677bbdbf..83c0af7f9001e97ddf121295a30db7545d212368 100644 (file)
@@ -1253,24 +1253,24 @@ void* healthChecksThread()
 
     for(auto& dss : g_dstates.getCopy()) { // this points to the actual shared_ptrs!
       if(dss->availability==DownstreamState::Availability::Auto) {
-       bool newState=upCheck(*dss);
-       if (newState) {
-               if (dss->currentCheckFailures != 0) {
-                       dss->currentCheckFailures = 0;
-               }
-       }
-       else if (!newState && dss->upStatus) {
-         dss->currentCheckFailures++;
-         if (dss->currentCheckFailures < dss->maxCheckFailures) {
-           newState = true;
-         }
-       }
-
-       if(newState != dss->upStatus) {
-         warnlog("Marking downstream %s as '%s'", dss->getNameWithAddr(), newState ? "up" : "down");
-         dss->upStatus = newState;
-         dss->currentCheckFailures = 0;
-       }
+        bool newState=upCheck(*dss);
+        if (newState) {
+          if (dss->currentCheckFailures != 0) {
+            dss->currentCheckFailures = 0;
+          }
+        }
+        else if (!newState && dss->upStatus) {
+          dss->currentCheckFailures++;
+          if (dss->currentCheckFailures < dss->maxCheckFailures) {
+            newState = true;
+          }
+        }
+
+        if(newState != dss->upStatus) {
+          warnlog("Marking downstream %s as '%s'", dss->getNameWithAddr(), newState ? "up" : "down");
+          dss->upStatus = newState;
+          dss->currentCheckFailures = 0;
+        }
       }
 
       auto delta = dss->sw.udiffAndSet()/1000000.0;