builder/common: if cancel during SSH, cancel the attempts
This commit is contained in:
parent
51e998a81f
commit
2ee81f1491
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue