From a79d375f4eccfc4967fa9ef8897e72c52884e2cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sat, 16 Jan 2021 17:31:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4RPC=E9=80=9A=E8=AE=AF?= =?UTF-8?q?=E7=9A=84=E6=9C=80=E5=A4=A7=E6=B6=88=E6=81=AF=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/rpc/rpc_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rpc/rpc_client.go b/internal/rpc/rpc_client.go index 2a996a6f..71ddf800 100644 --- a/internal/rpc/rpc_client.go +++ b/internal/rpc/rpc_client.go @@ -309,11 +309,11 @@ func (this *RPCClient) init() error { } var conn *grpc.ClientConn 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" { conn, err = grpc.Dial(u.Host, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{ InsecureSkipVerify: true, - }))) + })), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(128*1024*1024))) } else { return errors.New("parse endpoint failed: invalid scheme '" + u.Scheme + "'") }