Skip to content

Commit

Permalink
pkg/manager: abort timers on context closure
Browse files Browse the repository at this point in the history
There's a 15 minutes timer in the diff fuzzer that needs to be
conditional on the context object.
  • Loading branch information
a-nogikh committed Jan 28, 2025
1 parent 796bb88 commit dd2261d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/manager/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ func (dc *diffContext) Loop(baseCtx context.Context) error {
// Let both base and patched instances somewhat progress in fuzzing before we take
// VMs away for bug reproduction.
// TODO: determine the exact moment of corpus triage.
time.Sleep(15 * time.Minute)
select {
case <-time.After(15 * time.Minute):
case <-ctx.Done():
return nil
}
log.Logf(0, "starting bug reproductions")
reproLoop.Loop(ctx)
return nil
Expand Down

0 comments on commit dd2261d

Please sign in to comment.