Merge pull request #1143 from ibuildthecloud/fix-panic-2

Fix panic when TCP timeout happens on SSH connect
This commit is contained in:
Evan Hazlett 2015-05-07 13:57:01 -07:00
commit 08ebaa01d0
1 changed files with 2 additions and 1 deletions

View File

@ -77,9 +77,10 @@ func (client *Client) Run(command string) (Output, error) {
if i == maxDialAttempts { if i == maxDialAttempts {
return output, errors.New("Max SSH/TCP dial attempts exceeded") return output, errors.New("Max SSH/TCP dial attempts exceeded")
} }
} } else {
break break
} }
}
session, err := conn.NewSession() session, err := conn.NewSession()
if err != nil { if err != nil {