From 97f92b5b5577348d68019676ef1690e7325c257c Mon Sep 17 00:00:00 2001 From: colindickson Date: Wed, 27 Mar 2024 14:34:45 -0400 Subject: [PATCH] shutdown emitter in tier 2 --- service/tier2.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/tier2.go b/service/tier2.go index cecb53752..6437063c0 100644 --- a/service/tier2.go +++ b/service/tier2.go @@ -179,6 +179,9 @@ func (s *Tier2Service) ProcessRange(request *pbssinternal.ProcessRangeRequest, s if err != nil { return connect.NewError(connect.CodeInternal, fmt.Errorf("unable to initialize dmetering: %w", err)) } + defer func() { + emitter.Shutdown(nil) + }() ctx = context.WithValue(ctx, "event_emitter", emitter)