When there is no route to host for SSH, re-establish a new connection

This commit is contained in:
Mitchell Hashimoto 2013-03-14 12:51:16 -07:00
parent 43f3764e5b
commit c22e4fe19b
2 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@ BUG FIXES:
- Quote keys to StringBlockEditor so keys with spaces, parens, and
so on work properly.
- When there is no route to host for SSH, re-establish a new connection.
## 1.1.0 (March 14, 2013)

View File

@ -126,6 +126,9 @@ module VagrantPlugins
# socket.
begin
@connection.exec!("")
rescue Errno::EHOSTUNREACH
@logger.info("No route to host for connection. Not re-using.")
@connection = nil
rescue IOError
@logger.info("Connection has been closed. Not re-using.")
@connection = nil