From 2da53f54f44a9eeffbf1f5995f17730f6d287677 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 4 Sep 2013 22:07:19 -0700 Subject: [PATCH] builder/digitalocean: break loop if we reach off state Otherwise we get stuck in a long loop. Whoops. --- builder/digitalocean/step_power_off.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builder/digitalocean/step_power_off.go b/builder/digitalocean/step_power_off.go index e0b551863..a29116cae 100644 --- a/builder/digitalocean/step_power_off.go +++ b/builder/digitalocean/step_power_off.go @@ -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 {