AlexStocks commented on code in PR #2775:
URL: https://github.com/apache/dubbo-go/pull/2775#discussion_r1948099993
##########
registry/directory/directory.go:
##########
@@ -118,15 +118,46 @@ func (dir *RegistryDirectory) Subscribe(url *common.URL)
error {
logger.Error("registry.Subscribe(url:%v, dir:%v) =
error:%v", url, dir, err)
}
+ }()
+
+ // Get the timeout time from the registration center configuration
(default time 5s)
+ registerUrl := dir.registry.GetURL()
+
+ var timeoutStr string
+
+ if registerUrl != nil {
+ if val := registerUrl.GetParam(constant.RegistryTimeoutKey,
""); val != "" {
+ timeoutStr = val
+ }
+ }
+
+ timeout, err := time.ParseDuration(timeoutStr)
Review Comment:
这里不判断下 timeoutStr 是否为空吗?
--
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]