mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 23:30:26 +08:00
调整RPC通讯的最大消息尺寸
This commit is contained in:
@@ -309,11 +309,11 @@ func (this *RPCClient) init() error {
|
|||||||
}
|
}
|
||||||
var conn *grpc.ClientConn
|
var conn *grpc.ClientConn
|
||||||
if u.Scheme == "http" {
|
if u.Scheme == "http" {
|
||||||
conn, err = grpc.Dial(u.Host, grpc.WithInsecure())
|
conn, err = grpc.Dial(u.Host, grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(128*1024*1024)))
|
||||||
} else if u.Scheme == "https" {
|
} else if u.Scheme == "https" {
|
||||||
conn, err = grpc.Dial(u.Host, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{
|
conn, err = grpc.Dial(u.Host, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
})))
|
})), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(128*1024*1024)))
|
||||||
} else {
|
} else {
|
||||||
return errors.New("parse endpoint failed: invalid scheme '" + u.Scheme + "'")
|
return errors.New("parse endpoint failed: invalid scheme '" + u.Scheme + "'")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user