Commit 352f875d authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/amazonebs: Handle interrupts while waiting for SSH

parent 417f7e7f
......@@ -83,6 +83,11 @@ ConnectWaitLoop:
case <-timeout:
ui.Error("Timeout while waiting to connect to SSH.")
return multistep.ActionHalt
case <-time.After(1 * time.Second):
if _, ok := state[multistep.StateCancelled]; ok {
log.Println("Interrupt detected, quitting waiting for SSH.")
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