From 0cc2c3f1f2ab161e8c96dd6e16f366d02cb63c45 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 4 Oct 2022 12:25:44 +0200 Subject: [PATCH] bb_runner: Call NewServersFromConfigurationAndServe() properly --- cmd/bb_runner/main.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/cmd/bb_runner/main.go b/cmd/bb_runner/main.go index f1233573..d251c80d 100644 --- a/cmd/bb_runner/main.go +++ b/cmd/bb_runner/main.go @@ -122,15 +122,13 @@ func main() { r = runner.NewPathExistenceCheckingRunner(r, configuration.ReadinessCheckingPathnames) } - go func() { - log.Fatal( - "gRPC server failure: ", - bb_grpc.NewServersFromConfigurationAndServe( - configuration.GrpcServers, - func(s grpc.ServiceRegistrar) { - runner_pb.RegisterRunnerServer(s, r) - })) - }() + if err := bb_grpc.NewServersFromConfigurationAndServe( + configuration.GrpcServers, + func(s grpc.ServiceRegistrar) { + runner_pb.RegisterRunnerServer(s, r) + }); err != nil { + log.Fatal("gRPC server failure: ", err) + } lifecycleState.MarkReadyAndWait() }