Skip to content

Commit

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

[backport 3.4] embed: unlimit the recv msg size of grpc-gateway
  • Loading branch information
hexfusion authored Jun 11, 2021
2 parents d19fbe5 + 628fa18 commit 0ecc337
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions embed/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"
"io/ioutil"
defaultLog "log"
"math"
"net"
"net/http"
"strings"
Expand Down Expand Up @@ -229,6 +230,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 0ecc337

Please sign in to comment.