aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/manager/repro.go17
1 files changed, 10 insertions, 7 deletions
diff --git a/pkg/manager/repro.go b/pkg/manager/repro.go
index 038980624..8a6b1331d 100644
--- a/pkg/manager/repro.go
+++ b/pkg/manager/repro.go
@@ -198,13 +198,7 @@ func (r *ReproLoop) Loop(ctx context.Context) {
for {
crash := r.popCrash()
- for crash == nil {
- select {
- case <-r.pingQueue:
- crash = r.popCrash()
- case <-ctx.Done():
- return
- }
+ for {
if crash != nil && !r.mgr.NeedRepro(crash) {
crash = nil
// Now we might not need that many VMs.
@@ -212,6 +206,15 @@ func (r *ReproLoop) Loop(ctx context.Context) {
r.adjustPoolSizeLocked()
r.mu.Unlock()
}
+ if crash != nil {
+ break
+ }
+ select {
+ case <-r.pingQueue:
+ crash = r.popCrash()
+ case <-ctx.Done():
+ return
+ }
}
// Now wait until we can schedule another runner.