AlexStocks commented on code in PR #2168: URL: https://github.com/apache/dubbo-go/pull/2168#discussion_r1062208841
########## registry/servicediscovery/service_discovery_registry.go: ########## @@ -230,7 +231,28 @@ func (s *serviceDiscoveryRegistry) Subscribe(url *common.URL, notify registry.No } // LoadSubscribeInstances load subscribe instance -func (s *serviceDiscoveryRegistry) LoadSubscribeInstances(_ *common.URL, _ registry.NotifyListener) error { +func (s *serviceDiscoveryRegistry) LoadSubscribeInstances(url *common.URL, notify registry.NotifyListener) error { + appName := url.GetParam(constant.ApplicationKey, url.Username) + instances := s.serviceDiscovery.GetInstances(appName) + for _, instance := range instances { + if instance.GetMetadata() == nil { + logger.Warnf("Instance metadata is nil: %s", instance.GetHost()) + continue + } + revision := instance.GetMetadata()[constant.ExportedServicesRevisionPropertyName] Review Comment: 加上 ok 判断吧。 -- 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. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org