diff --git a/CHANGELOG.md b/CHANGELOG.md index 7583301a6..6a26f39e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/plugins/communicators/ssh/communicator.rb b/plugins/communicators/ssh/communicator.rb index fbc22c05e..bb9dc7792 100644 --- a/plugins/communicators/ssh/communicator.rb +++ b/plugins/communicators/ssh/communicator.rb @@ -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