From aa66ef37c9a37a0dbf8acb91c1d0885a36012f33 Mon Sep 17 00:00:00 2001 From: Povilas Versockas Date: Wed, 20 Dec 2023 14:09:26 +0200 Subject: [PATCH] fix: log service doesnt start up (#4814) (#4815) --- pkg/logs/service.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/logs/service.go b/pkg/logs/service.go index ec1c535ba9d..98013158067 100644 --- a/pkg/logs/service.go +++ b/pkg/logs/service.go @@ -123,7 +123,9 @@ func (ls *LogsService) Shutdown(ctx context.Context) (err error) { return err } - ls.grpcServer.GracefulStop() + if ls.grpcServer != nil { + ls.grpcServer.GracefulStop() + } // TODO decide how to handle graceful shutdown of consumers @@ -136,7 +138,7 @@ func (ls *LogsService) WithHttpAddress(address string) *LogsService { } func (ls *LogsService) WithGrpcAddress(address string) *LogsService { - ls.httpAddress = address + ls.grpcAddress = address return ls }