From 3389b3872f8fbbe1cefd1f99a288690f39467120 Mon Sep 17 00:00:00 2001
From: cvictory <shenglicao2@gmail.com>
Date: Sun, 27 Sep 2020 17:33:16 +0800
Subject: [PATCH] fix: if the registry center notify address list, it cannot
 remove invoker list from cache

---
 cluster/router/chain/chain.go | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/cluster/router/chain/chain.go b/cluster/router/chain/chain.go
index 952aedf92..04129ebb4 100644
--- a/cluster/router/chain/chain.go
+++ b/cluster/router/chain/chain.go
@@ -186,9 +186,6 @@ func (c *RouterChain) copyInvokerIfNecessary(cache *InvokerCache) []protocol.Inv
 func (c *RouterChain) buildCache() {
 	origin := c.loadCache()
 	invokers := c.copyInvokerIfNecessary(origin)
-	if invokers == nil || len(invokers) == 0 {
-		return
-	}
 
 	var (
 		mutex sync.Mutex
-- 
GitLab