From ac7807e7e5bb782c271c1ab2db3014da9398a79e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 15 Jul 2013 14:10:30 +0900 Subject: [PATCH] builder/common: if cancel during SSH, cancel the attempts --- builder/common/step_connect_ssh.go | 3 +++ 1 file changed, 3 insertions(+) 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 }