Vanillaxi commented on code in PR #3482:
URL: https://github.com/apache/dubbo-go/pull/3482#discussion_r3567890515


##########
registry/polaris/registry.go:
##########
@@ -139,15 +143,7 @@ func (pr *polarisRegistry) Subscribe(url *common.URL, 
notifyListener registry.No
 
        for {
                serviceName := url.Interface()
-               watcher, err := pr.createPolarisWatcher(serviceName)
-               if err != nil {
-                       logger.Warnf("[Registry][Polaris] getwatcher() = 
err=%v", perrors.WithStack(err))
-                       <-timer.C
-                       timer.Reset(time.Duration(RegistryConnDelay) * 
time.Second)
-                       continue
-               }

Review Comment:
   这里是合并了 watcher 和 listener 创建失败的处理分支,` createPolarisListener` 内部调用 
`createPolarisWatcher`,将创建 watcher 的 err 直接向上返回,然后 Subscribe 外层统一 handle err。



-- 
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: [email protected]

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