This reverts commit 5856538706dc3abc44dd5ba1a8bb19a0dfb1ab25.
This commit is contained in:
14
server.go
14
server.go
@ -208,27 +208,17 @@ func MaxMsgSize(m int) ServerOption {
|
||||
|
||||
// MaxRecvMsgSize returns a ServerOption to set the max message size in bytes the server can receive.
|
||||
// If this is not set, gRPC uses the default 4MB.
|
||||
// Note that the maximum effective value is MaxUint32 due to protocol limitations.
|
||||
func MaxRecvMsgSize(m int) ServerOption {
|
||||
return func(o *options) {
|
||||
if int64(m) > int64(math.MaxUint32) {
|
||||
o.maxReceiveMessageSize = math.MaxUint32
|
||||
} else {
|
||||
o.maxReceiveMessageSize = m
|
||||
}
|
||||
o.maxReceiveMessageSize = m
|
||||
}
|
||||
}
|
||||
|
||||
// MaxSendMsgSize returns a ServerOption to set the max message size in bytes the server can send.
|
||||
// If this is not set, gRPC uses the default 4MB.
|
||||
// Note that the maximum effective value is MaxUint32 due to protocol limitations.
|
||||
func MaxSendMsgSize(m int) ServerOption {
|
||||
return func(o *options) {
|
||||
if int64(m) > int64(math.MaxUint32) {
|
||||
o.maxSendMessageSize = math.MaxUint32
|
||||
} else {
|
||||
o.maxSendMessageSize = m
|
||||
}
|
||||
o.maxSendMessageSize = m
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user