Alanxtl commented on code in PR #3643:
URL: https://github.com/apache/dubbo-go/pull/3643#discussion_r3758686600
##########
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
- // Set max send and recv msg size
+ // Apply client message-size limits from URL compatibility parameters.
maxCallRecvMsgSize := constant.DefaultMaxCallRecvMsgSize
if recvMsgSize, err :=
humanize.ParseBytes(url.GetParam(constant.MaxCallRecvMsgSize, "")); err == nil
&& recvMsgSize > 0 {
maxCallRecvMsgSize = int(recvMsgSize)
}
- cliKeepAliveOpts = append(cliKeepAliveOpts,
tri.WithReadMaxBytes(maxCallRecvMsgSize))
+ clientKeepAliveOpts = append(clientKeepAliveOpts,
tri.WithReadMaxBytes(maxCallRecvMsgSize))
maxCallSendMsgSize := constant.DefaultMaxCallSendMsgSize
if sendMsgSize, err :=
humanize.ParseBytes(url.GetParam(constant.MaxCallSendMsgSize, "")); err == nil
&& sendMsgSize > 0 {
maxCallSendMsgSize = int(sendMsgSize)
}
- cliKeepAliveOpts = append(cliKeepAliveOpts,
tri.WithSendMaxBytes(maxCallSendMsgSize))
+ clientKeepAliveOpts = append(clientKeepAliveOpts,
tri.WithSendMaxBytes(maxCallSendMsgSize))
- // Set keepalive interval and keepalive timeout
- // Compatibility: read the legacy URL keepalive parameters.
- // TODO: remove KeepAliveInterval and KeepAliveTimeout in version 4.0.0.
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]