move server defaults, delete defer cancel() in stream.go

This commit is contained in:
Yuxuan Li
2017-04-26 17:39:57 -07:00
parent eaa9ccb053
commit ecbc34aaca
3 changed files with 16 additions and 13 deletions

View File

@ -61,6 +61,11 @@ import (
"google.golang.org/grpc/transport"
)
const (
defaultServerMaxReceiveMessageSize = 1024 * 1024 * 4
defaultServerMaxSendMessageSize = 1024 * 1024 * 4
)
type methodHandler func(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor UnaryServerInterceptor) (interface{}, error)
// MethodDesc represents an RPC service's method specification.