Skip to content

Commit

Permalink
Merge pull request #2544 from hashicorp/b-plan-panic
Browse files Browse the repository at this point in the history
Fix a panic during plan evaluation
  • Loading branch information
dadgar committed Apr 10, 2017
2 parents 0d2e99b + 1526f10 commit d70313a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nomad/plan_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ func evaluatePlan(pool *EvaluatePool, snap *state.StateSnapshot, plan *structs.P

// Evalute each node in the plan, handling results as they are ready to
// avoid blocking.
OUTER:
for len(nodeIDList) > 0 {
nodeID := nodeIDList[0]
select {
Expand All @@ -276,7 +277,7 @@ func evaluatePlan(pool *EvaluatePool, snap *state.StateSnapshot, plan *structs.P
// which may save time processing additional entries.
if cancel := handleResult(r.nodeID, r.fit, r.err); cancel {
didCancel = true
break
break OUTER
}
}
}
Expand Down

0 comments on commit d70313a

Please sign in to comment.