Skip to content

Commit

Permalink
Merge pull request #13077 from spacewander/grpc-gateway
Browse files Browse the repository at this point in the history
embed: unlimit the recv msg size of grpc-gateway
  • Loading branch information
gyuho committed Jun 10, 2021
2 parents c2b729d + 576861e commit 5667803
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/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 @@ -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 5667803

Please sign in to comment.