From 732ca874b85987f92af70c08f83004b9bb2d0f63 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Thu, 7 May 2015 13:42:28 -0700 Subject: [PATCH] Fix panic when TCP timeout happens on SSH connect Signed-off-by: Darren Shepherd --- ssh/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssh/client.go b/ssh/client.go index 6a99dca7bb..252e30c9fa 100644 --- a/ssh/client.go +++ b/ssh/client.go @@ -77,8 +77,9 @@ func (client *Client) Run(command string) (Output, error) { if i == maxDialAttempts { return output, errors.New("Max SSH/TCP dial attempts exceeded") } + } else { + break } - break } session, err := conn.NewSession()