diff --git a/builder/common/step_connect_ssh.go b/builder/common/step_connect_ssh.go index 6c05db935..2f32b7c0f 100644 --- a/builder/common/step_connect_ssh.go +++ b/builder/common/step_connect_ssh.go @@ -73,6 +73,9 @@ WaitLoop: return multistep.ActionHalt case <-time.After(1 * time.Second): if _, ok := state[multistep.StateCancelled]; ok { + // The step sequence was cancelled, so cancel waiting for SSH + // and just start the halting process. + s.cancel = true log.Println("Interrupt detected, quitting waiting for SSH.") return multistep.ActionHalt }