mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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:
commit
1e2cab929c
@ -19,6 +19,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
defaultLog "log"
|
defaultLog "log"
|
||||||
|
"math"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
@ -222,6 +223,10 @@ func (sctx *serveCtx) registerGateway(opts []grpc.DialOption) (*gw.ServeMux, err
|
|||||||
addr = fmt.Sprintf("%s://%s", network, addr)
|
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...)
|
conn, err := grpc.DialContext(ctx, addr, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user