From 21e572c74be6febe7293993e0a10088525fdb6ca Mon Sep 17 00:00:00 2001
From: Ian Luo <ian.luo@gmail.com>
Date: Fri, 14 Aug 2020 09:02:33 +0800
Subject: [PATCH] rename ch to notify

---
 cluster/router/chain/chain.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cluster/router/chain/chain.go b/cluster/router/chain/chain.go
index 2ceb231b7..80f0b25d8 100644
--- a/cluster/router/chain/chain.go
+++ b/cluster/router/chain/chain.go
@@ -63,7 +63,7 @@ type RouterChain struct {
 	// The timestamp of last update for address cache
 	last time.Time
 	// Channel for notify to update the address cache
-	ch chan struct{}
+	notify chan struct{}
 	// Address cache
 	cache atomic.Value
 }
@@ -118,7 +118,7 @@ func (c *RouterChain) SetInvokers(invokers []protocol.Invoker) {
 		c.last = now
 		c.count = 0
 		go func() {
-			c.ch <- struct{}{}
+			c.notify <- struct{}{}
 		}()
 	}
 }
@@ -130,7 +130,7 @@ func (c *RouterChain) loop() {
 		select {
 		case <-time.Tick(timeInterval):
 			c.buildCache()
-		case <-c.ch:
+		case <-c.notify:
 			c.buildCache()
 		}
 	}
@@ -234,7 +234,7 @@ func NewRouterChain(url *common.URL) (*RouterChain, error) {
 		builtinRouters: routers,
 		routers:        newRouters,
 		last:           time.Now(),
-		ch:             make(chan struct{}),
+		notify:         make(chan struct{}),
 	}
 	if url != nil {
 		chain.url = *url
-- 
GitLab