diff --git a/cluster/router/chain/chain.go b/cluster/router/chain/chain.go index db7ce130ffb95291230cfd2dc3029819512bcae3..356011dac35a39879979da41a541c3354981c511 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 {