From a5bd41606fd4b6bef3771ea1d271cfc9a6e0ee1a Mon Sep 17 00:00:00 2001
From: Joe Zou <yixian.zou@gmail.com>
Date: Fri, 11 Dec 2020 17:44:17 +0800
Subject: [PATCH] Revert "trigger init router for first call"

This reverts commit af608d89f0c60d16f6a6e380e4e53ade99f15ab6.
---
 cluster/router/chain/chain.go | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/cluster/router/chain/chain.go b/cluster/router/chain/chain.go
index db7ce130f..356011dac 100644
--- a/cluster/router/chain/chain.go
+++ b/cluster/router/chain/chain.go
@@ -65,8 +65,6 @@ type RouterChain struct {
 	notify chan struct{}
 	// Address cache
 	cache atomic.Value
-	// init
-	init sync.Once
 }
 
 // Route Loop routers in RouterChain and call Route method to determine the target invokers list.
@@ -113,11 +111,6 @@ func (c *RouterChain) SetInvokers(invokers []protocol.Invoker) {
 	c.invokers = invokers
 	c.mutex.Unlock()
 
-	// it should trigger init router for first call
-	c.init.Do(func() {
-		c.notify <- struct{}{}
-	})
-
 	c.count++
 	now := time.Now()
 	if c.count >= countThreshold && now.Sub(c.last) >= timeThreshold {
-- 
GitLab