From 7f0916b6468ced5426ecaf5dcd2041833f04ba99 Mon Sep 17 00:00:00 2001 From: Patrick Lucas Date: Wed, 2 Oct 2013 14:55:28 -0700 Subject: [PATCH] An SSH timeout should be treated as an error --- common/step_connect_ssh.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/step_connect_ssh.go b/common/step_connect_ssh.go index a8be11c17..39e32a3d8 100644 --- a/common/step_connect_ssh.go +++ b/common/step_connect_ssh.go @@ -72,7 +72,9 @@ WaitLoop: state.Put("communicator", comm) break WaitLoop case <-timeout: - ui.Error("Timeout waiting for SSH.") + err := fmt.Errorf("Timeout waiting for SSH.") + state.Put("error", err) + ui.Error(err.Error()) close(cancel) return multistep.ActionHalt case <-time.After(1 * time.Second):