diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-04-11 14:34:08 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-04-15 08:18:26 +0000 |
| commit | df98310f5ee6c72303eacdd6df1f30dd644bcaba (patch) | |
| tree | b04318600ef9bbf4a156ba735319fd00a3ff2e45 /pkg/manager | |
| parent | 80d0e54b1ffe18e2e65923966dadc7e344dba55c (diff) | |
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.
Diffstat (limited to 'pkg/manager')
| -rw-r--r-- | pkg/manager/diff.go | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |
