From df98310f5ee6c72303eacdd6df1f30dd644bcaba Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 11 Apr 2025 14:34:08 +0200 Subject: pkg/manager: fix a missed case of context closure handling While doing a blocking write to the channel, take the possibility of the context closure into account. --- pkg/manager/diff.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/manager/diff.go b/pkg/manager/diff.go index 54c8dc822..229868ff9 100644 --- a/pkg/manager/diff.go +++ b/pkg/manager/diff.go @@ -176,9 +176,12 @@ loop: log.Errorf("repro didn't crash base, but base itself crashed: %s", ret.origReport.Title) } else if ret.crashReport == nil { dc.store.BaseNotCrashed(ret.origReport.Title) - dc.patchedOnly <- &UniqueBug{ + select { + case <-ctx.Done(): + case dc.patchedOnly <- &UniqueBug{ Report: ret.origReport, Repro: ret.repro, + }: } log.Logf(0, "patched-only: %s", ret.origReport.Title) } else { -- cgit mrf-deployment