From b290c233ea5e11b273156ebd9e4ba91845eed7a0 Mon Sep 17 00:00:00 2001 From: David Colburn Date: Wed, 18 Oct 2023 23:18:53 -0700 Subject: [PATCH] fix CreateEgress not completing (#2156) --- pkg/service/egress.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/service/egress.go b/pkg/service/egress.go index d6698c7e0..0a77a231f 100644 --- a/pkg/service/egress.go +++ b/pkg/service/egress.go @@ -25,6 +25,7 @@ import ( "github.com/livekit/livekit-server/pkg/rtc" "github.com/livekit/protocol/egress" "github.com/livekit/protocol/livekit" + "github.com/livekit/protocol/logger" "github.com/livekit/protocol/rpc" "github.com/livekit/protocol/utils" ) @@ -207,10 +208,10 @@ func (s *egressLauncher) StartEgressWithClusterId(ctx context.Context, clusterId return nil, err } - // TODO: remove - go func() { - _, _ = s.io.CreateEgress(ctx, info) - }() + _, err = s.io.CreateEgress(ctx, info) + if err != nil { + logger.Errorw("failed to create egress", err) + } return info, nil }