wangxw666 commented on a change in pull request #1244:
URL: https://github.com/apache/dubbo-go/pull/1244#discussion_r656131172



##########
File path: cluster/directory/base_directory.go
##########
@@ -44,15 +43,11 @@ type BaseDirectory struct {
 }
 
 // NewBaseDirectory Create BaseDirectory with URL
-func NewBaseDirectory(url *common.URL) (dir BaseDirectory) {
-       dir = BaseDirectory{
-               url:         url,
-               destroyed:   atomic.NewBool(false),
-               routerChain: &chain.RouterChain{},
+func NewBaseDirectory(url *common.URL) BaseDirectory {
+       return BaseDirectory{
+               url:       url,
+               destroyed: atomic.NewBool(false),
        }
-       // start to listen notify
-       go dir.routerChain.Loop()

Review comment:
       因为baseDirectory在new的时候不需要创建routerChain,因为我没有创建任何路由策略,所不需要loop




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to