You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/07/06 02:32:21 UTC

[GitHub] [dubbo-go] zouyx commented on a change in pull request #644: Fix: waitGroup use

zouyx commented on a change in pull request #644:
URL: https://github.com/apache/dubbo-go/pull/644#discussion_r449954800



##########
File path: registry/zookeeper/registry.go
##########
@@ -134,6 +134,7 @@ func (r *zkRegistry) InitListeners() {
 					regConfigListener.Close()
 				}
 				newDataListener.SubscribeURL(conf, NewRegistryConfigurationListener(r.client, r))
+				r.WaitGroup().Add(1)
 				go r.listener.ListenServiceEvent(conf, fmt.Sprintf("/dubbo/%s/"+constant.DEFAULT_CATEGORY, url.QueryEscape(conf.Service())), newDataListener)

Review comment:
       I think the operation which is called add wait group should relate to listen service event.
   So they can extract a new method.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org