Skip to content

Commit

Permalink
Merge pull request #13099 from tangcong/automated-cherry-pick-of-#130…
Browse files Browse the repository at this point in the history
…77-origin-release-3.5

[backport 3.5] embed: unlimit the recv msg size of grpc-gateway
  • Loading branch information
hexfusion committed Jun 11, 2021
2 parents 8139dd3 + 53e04b2 commit 1e2cab9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/embed/serve.go
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"
"io/ioutil"
defaultLog "log"
"math"
"net"
"net/http"
"strings"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1e2cab9

Please sign in to comment.