You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2020/11/06 15:34:18 UTC

[dubbo-go] branch develop updated: fix bug: the ticket just need to create once

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2ab8035  fix bug: the ticket just need to create once
     new c4a854b  Merge pull request #849 from cvictory/local_fix_chain_loop_ticket
2ab8035 is described below

commit 2ab8035fb643093915625cf5c06b3c4035b1fcbc
Author: cvictory <sh...@gmail.com>
AuthorDate: Thu Nov 5 15:09:40 2020 +0800

    fix bug: the ticket just need to create once
---
 cluster/router/chain/chain.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cluster/router/chain/chain.go b/cluster/router/chain/chain.go
index 952aedf..252093a 100644
--- a/cluster/router/chain/chain.go
+++ b/cluster/router/chain/chain.go
@@ -125,8 +125,8 @@ func (c *RouterChain) SetInvokers(invokers []protocol.Invoker) {
 // loop listens on events to update the address cache when it's necessary, either when it receives notification
 // from address update, or when timeInterval exceeds.
 func (c *RouterChain) loop() {
+	ticker := time.NewTicker(timeInterval)
 	for {
-		ticker := time.NewTicker(timeInterval)
 		select {
 		case <-ticker.C:
 			c.buildCache()