Skip to content
Snippets Groups Projects
Commit a5bd4160 authored by 邹毅贤's avatar 邹毅贤
Browse files

Revert "trigger init router for first call"

This reverts commit af608d89.
parent af608d89
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment