[#493] node: Abolish non-usable gRPC server configurations

Reflect service is disabled, max message size frozen by constant.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-12 11:00:46 +03:00 committed by Leonard Lyubich
parent 6d7fff1870
commit 31eb6617fc
2 changed files with 9 additions and 21 deletions

View file

@ -7,7 +7,6 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)
func initGRPC(c *cfg) {
@ -17,7 +16,7 @@ func initGRPC(c *cfg) {
fatalOnErr(err)
c.cfgGRPC.server = grpc.NewServer(
grpc.MaxSendMsgSize(c.viper.GetInt(cfgMaxMsgSize)),
grpc.MaxSendMsgSize(maxMsgSize),
)
c.onShutdown(func() {
@ -33,12 +32,6 @@ func serveGRPC(c *cfg) {
c.wg.Done()
}()
// read more about reflect service at
// https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md
if c.cfgGRPC.enableReflectService {
reflection.Register(c.cfgGRPC.server)
}
if err := c.cfgGRPC.server.Serve(c.cfgGRPC.listener); err != nil {
fmt.Println("gRPC server error", err)
}