Attempt to re-establish SSH connection on Net::SSH::Disconnect

This commit is contained in:
Mitchell Hashimoto 2013-03-18 18:10:54 -07:00
parent 715539eac3
commit d7b7a32814
2 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,8 @@
## 1.1.3 (unreleased)
BUG FIXES:
- Attempt to re-establish SSH connection on `Net::SSH::Disconnect`
## 1.1.2 (March 18, 2013)

View File

@ -129,6 +129,9 @@ module VagrantPlugins
rescue Errno::EHOSTUNREACH
@logger.info("No route to host for connection. Not re-using.")
@connection = nil
rescue Net::SSH::Disconnect
@logger.info("SSH disconnected. Not-reusing connection.")
@connection = nil
rescue IOError
@logger.info("Connection has been closed. Not re-using.")
@connection = nil