Snow-kal commented on code in PR #3231:
URL: https://github.com/apache/dubbo-go/pull/3231#discussion_r2901393416
##########
protocol/grpc/client.go:
##########
@@ -93,24 +88,10 @@ func NewClient(url *common.URL) (*Client, error) {
grpc.MaxCallRecvMsgSize(maxCallRecvMsgSize),
grpc.MaxCallSendMsgSize(maxCallSendMsgSize),
),
+ grpc.WithTransportCredentials(insecure.NewCredentials()),
Review Comment:
好的 感谢建议 请问一下这样更改可以吗
<img width="1416" height="1055" alt="image"
src="https://github.com/user-attachments/assets/6bcb347d-5bea-422e-8d3f-11bbef471b2b"
/>
简单总结一下就是
```
var transportCreds credentials.TransportCredentials
transportCreds = insecure.NewCredentials() // 默认值
if url 有 TLSConfigKey && TLS 有效 && cfg != nil {
transportCreds = credentials.NewTLS(cfg) // 覆盖,不是 append
}
dialOpts = append(dialOpts, grpc.WithTransportCredentials(transportCreds))
// 只 append 一次
```
如果不行的话我就直接改回去了
--
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]