From 5591f0a546c75620d1b10ecdee7e44e6f8b02781 Mon Sep 17 00:00:00 2001 From: rmawatson Date: Thu, 19 Feb 2026 01:00:53 +0000 Subject: [PATCH] fixes #793 --- internal/pkg/report/reporter.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/pkg/report/reporter.go b/internal/pkg/report/reporter.go index e49402b..6be40ae 100644 --- a/internal/pkg/report/reporter.go +++ b/internal/pkg/report/reporter.go @@ -26,6 +26,8 @@ type Reporter struct { cancel context.CancelFunc closed bool + closedM sync.Mutex + client client.Client clientM sync.Mutex @@ -184,7 +186,13 @@ func (r *Reporter) RunDaemon() { } _ = r.ReportLog(false) - _ = r.ReportState() + + r.closedM.Lock() + defer r.closedM.Unlock() + + if !r.closed { + _ = r.ReportState() + } time.AfterFunc(time.Second, r.RunDaemon) } @@ -226,7 +234,9 @@ func (r *Reporter) SetOutputs(outputs map[string]string) { } func (r *Reporter) Close(lastWords string) error { + r.closedM.Lock() r.closed = true + r.closedM.Unlock() r.stateMu.Lock() if r.state.Result == runnerv1.Result_RESULT_UNSPECIFIED {