[#1893] neofs-node: Do not fail unless all gRPC endpoints are unavailable

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-10-25 09:48:02 +03:00 committed by fyrchik
parent 1e6588e761
commit 280e56f4bb
3 changed files with 25 additions and 7 deletions

View file

@ -9,6 +9,7 @@ import (
controlSvc "github.com/nspcc-dev/neofs-node/pkg/services/control/server"
"github.com/nspcc-dev/neofs-node/pkg/services/tree"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
"go.uber.org/zap"
"google.golang.org/grpc"
)
@ -50,7 +51,10 @@ func initControlService(c *cfg) {
)
lis, err := net.Listen("tcp", endpoint)
fatalOnErr(err)
if err != nil {
c.log.Error("can't listen gRPC endpoint (control)", zap.Error(err))
return
}
c.cfgControlService.server = grpc.NewServer()