Skip to content

Commit

Permalink
move up nil of indexCh
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Jun 22, 2022
1 parent 6fbd2a8 commit 2a358ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nomad/plan_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ func (p *planner) planApply() {
// This also limits how out of date our snapshot can be.
if planIndexCh != nil {
idx := <-planIndexCh
planIndexCh = nil
prevPlanResultIndex = max(prevPlanResultIndex, idx)
snap, err = p.snapshotMinIndex(prevPlanResultIndex, pending.plan.SnapshotIndex)
if err != nil {
p.logger.Error("failed to update snapshot state", "error", err)
pending.respond(nil, err)
planIndexCh = nil
continue
}
}
Expand Down

0 comments on commit 2a358ac

Please sign in to comment.