AlexStocks commented on code in PR #3231:
URL: https://github.com/apache/dubbo-go/pull/3231#discussion_r2899091949
##########
protocol/dubbo3/dubbo3_invoker.go:
##########
@@ -72,20 +71,16 @@ func NewDubboInvoker(url *common.URL) (*DubboInvoker,
error) {
rt string
consumerService any
)
- // TODO: Temporary compatibility with old APIs, can be removed later
- rt = config.GetConsumerConfig().RequestTimeout
+ rt = global.DefaultConsumerConfig().RequestTimeout
Review Comment:
原来 `config.GetConsumerConfig().RequestTimeout` 若无配置返回空字符串,由
`url.GetParamDuration` 处理默认值,用户可以明确禁用超时(传零值)。改成
`global.DefaultConsumerConfig().RequestTimeout` 后始终是 `"3s"`,超时无法被禁用,语义变了。
建议:先检查 ConsumerConfig attribute 是否存在,不存在时才使用 `DefaultConsumerConfig()`。
--
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]