Commit ac7807e7 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/common: if cancel during SSH, cancel the attempts

parent 29bfab06
...@@ -73,6 +73,9 @@ WaitLoop: ...@@ -73,6 +73,9 @@ WaitLoop:
return multistep.ActionHalt return multistep.ActionHalt
case <-time.After(1 * time.Second): case <-time.After(1 * time.Second):
if _, ok := state[multistep.StateCancelled]; ok { 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.") log.Println("Interrupt detected, quitting waiting for SSH.")
return multistep.ActionHalt return multistep.ActionHalt
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment