builder/digitalocean: break loop if we reach off state

Otherwise we get stuck in a long loop. Whoops.
This commit is contained in:
Mitchell Hashimoto 2013-09-04 22:07:19 -07:00
parent 82b46816d3
commit 39f7a5a617
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,10 @@ func (s *stepPowerOff) Run(state multistep.StateBag) multistep.StepAction {
}
err = waitForDropletState("off", dropletId, client, 20*time.Second)
if err == nil {
// We reached the state!
break
}
}
if err != nil {