You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/01/23 22:02:57 UTC

[trafficserver] 06/12: LGTM: fix a comparison that is always false.

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 563368b56ece275db1fb80fb9f2a062d378aa2fe
Author: John Rushford <jr...@apache.org>
AuthorDate: Wed Dec 18 17:28:40 2019 +0000

    LGTM: fix a comparison that is always false.
    
    Fixes a comparison error in NextHopSelectionStrategy::markNextHopUp()
    that prevents a host restoral message from being logged.
    
    (cherry picked from commit c4a30b2290d1f07b28e528db5cd125e1a1f1ceba)
---
 proxy/http/remap/NextHopSelectionStrategy.cc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/proxy/http/remap/NextHopSelectionStrategy.cc b/proxy/http/remap/NextHopSelectionStrategy.cc
index 99be984..a101dfe 100644
--- a/proxy/http/remap/NextHopSelectionStrategy.cc
+++ b/proxy/http/remap/NextHopSelectionStrategy.cc
@@ -267,7 +267,6 @@ NextHopSelectionStrategy::markNextHopDown(const uint64_t sm_id, ParentResult &re
 void
 NextHopSelectionStrategy::markNextHopUp(const uint64_t sm_id, ParentResult &result)
 {
-  uint32_t old_count = 0;
   //  Make sure that we are being called back with with a
   //   result structure with a parent that is being retried
   ink_assert(result.retry == true);
@@ -286,8 +285,6 @@ NextHopSelectionStrategy::markNextHopUp(const uint64_t sm_id, ParentResult &resu
 
   if (!h->available) {
     h->set_available();
-  }
-  if (h->available && old_count > 0) {
     NH_Note("[%" PRIu64 "] http parent proxy %s:%d restored", sm_id, h->hostname.c_str(), h->getPort(scheme));
   }
 }