Merge pull request #4741 from mitchellh/fixsshconnclose

communicator/ssh: don't return error if we can't close connection.
This commit is contained in:
Matthew Hooker 2017-03-30 02:15:40 -07:00 committed by GitHub
commit 7556b484b0
1 changed files with 2 additions and 1 deletions

View File

@ -250,7 +250,8 @@ func (c *comm) newSession() (session *ssh.Session, err error) {
func (c *comm) reconnect() (err error) {
if c.conn != nil {
return c.conn.Close()
// Ignore errors here because we don't care if it fails
c.conn.Close()
}
// Set the conn and client to nil since we'll recreate it