Snow-kal commented on code in PR #3643:
URL: https://github.com/apache/dubbo-go/pull/3643#discussion_r3758587511
##########
protocol/triple/client.go:
##########
@@ -296,29 +297,27 @@ func (cm *clientManager) callHealthWatch(ctx
context.Context, service string) (*
return stream, nil
}
-func genKeepAliveOptions(url *common.URL, tripleConf *global.TripleConfig)
([]tri.ClientOption, time.Duration, time.Duration, error) {
- var cliKeepAliveOpts []tri.ClientOption
+func resolveClientKeepaliveOptions(url *common.URL, tripleConf
*global.TripleConfig) ([]tri.ClientOption, time.Duration, time.Duration, error)
{
+ var clientKeepaliveOpts []tri.ClientOption
Review Comment:
已按照建议更改
##########
protocol/triple/client.go:
##########
@@ -172,15 +173,15 @@ func newClientManager(url *common.URL) (*clientManager,
error) {
tripleConf = tripleConfRaw.(*global.TripleConfig)
}
- // Handle keepalive options
- cliKeepAliveOpts, keepAliveInterval, keepAliveTimeout,
genKeepAliveOptsErr := genKeepAliveOptions(url, tripleConf)
- if genKeepAliveOptsErr != nil {
- logger.Errorf("[Triple][Client] genKeepAliveOpts failed,
err=%v", genKeepAliveOptsErr)
- return nil, genKeepAliveOptsErr
+ // Resolve keepalive and size-limit options before choosing the
transport.
+ clientKeepaliveOpts, keepAliveInterval, keepAliveTimeout, keepaliveErr
:= resolveClientKeepaliveOptions(url, tripleConf)
+ if keepaliveErr != nil {
+ logger.Errorf("[Triple][Client] resolve client keepalive
options failed, err=%v", keepaliveErr)
Review Comment:
已按照建议更改
--
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]