Skip to content

Commit

Permalink
fix: make max recv/send msg size setting default
Browse files Browse the repository at this point in the history
Signed-off-by: haoyun <yun.hao@daocloud.io>
  • Loading branch information
jonyhy96 committed Nov 18, 2021
1 parent 547040c commit f8d734e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,11 @@ func New(address string, opts ...ClientOpt) (*Client, error) {
if len(copts.dialOptions) > 0 {
gopts = copts.dialOptions
}
gopts = append(gopts, grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(defaults.DefaultMaxRecvMsgSize),
grpc.MaxCallSendMsgSize(defaults.DefaultMaxSendMsgSize)))
if len(copts.callOptions) > 0 {
gopts = append(gopts, grpc.WithDefaultCallOptions(copts.callOptions...))
} else {
gopts = append(gopts, grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(defaults.DefaultMaxRecvMsgSize),
grpc.MaxCallSendMsgSize(defaults.DefaultMaxSendMsgSize)))
}
if copts.defaultns != "" {
unary, stream := newNSInterceptors(copts.defaultns)
Expand Down

0 comments on commit f8d734e

Please sign in to comment.