Merge pull request #13099 from tangcong/automated-cherry-pick-of-#13077-origin-release-3.5

[backport 3.5] embed: unlimit the recv msg size of grpc-gateway
This commit is contained in:
Sam Batschelet 2021-06-10 21:28:31 -04:00 committed by GitHub
commit 1e2cab929c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,7 @@ import (
"fmt"
"io/ioutil"
defaultLog "log"
"math"
"net"
"net/http"
"strings"
@ -222,6 +223,10 @@ func (sctx *serveCtx) registerGateway(opts []grpc.DialOption) (*gw.ServeMux, err
addr = fmt.Sprintf("%s://%s", network, addr)
}
opts = append(opts, grpc.WithDefaultCallOptions([]grpc.CallOption{
grpc.MaxCallRecvMsgSize(math.MaxInt32),
}...))
conn, err := grpc.DialContext(ctx, addr, opts...)
if err != nil {
return nil, err