diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-01-28 11:13:19 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-01-29 10:31:50 +0000 |
| commit | d03b0c97faf4610981228dd69f6f9a94ab9f693b (patch) | |
| tree | 4099b45e372ccf3c475b671016430dc1fe3cd652 /pkg | |
| parent | 94e13671726abbcf766f9b4aacd2ee04de59dcbd (diff) | |
pkg/manager: abort timers on context closure
There's a 15 minutes timer in the diff fuzzer that needs to be
conditional on the context object.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/manager/diff.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/manager/diff.go b/pkg/manager/diff.go index 8218ce924..bdf638a51 100644 --- a/pkg/manager/diff.go +++ b/pkg/manager/diff.go @@ -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 |
