diff --git a/internal/pkg/agent/application/upgrade/artifact/download/http/progress_reporter.go b/internal/pkg/agent/application/upgrade/artifact/download/http/progress_reporter.go index 85de47849b2..3114016d284 100644 --- a/internal/pkg/agent/application/upgrade/artifact/download/http/progress_reporter.go +++ b/internal/pkg/agent/application/upgrade/artifact/download/http/progress_reporter.go @@ -53,6 +53,11 @@ func (dp *downloadProgressReporter) Report(ctx context.Context) { length := dp.length interval := dp.interval + // If there are no observers to report progress to, there is nothing to do! + if len(dp.progressObservers) == 0 { + return + } + go func() { t := time.NewTicker(interval) defer t.Stop()