communicators/ssh: handle closed connection without exception

This commit is contained in:
Mitchell Hashimoto 2013-08-29 10:35:56 -07:00
parent e8bdc817f0
commit 50fdf1358c
2 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,7 @@ IMPROVEMENTS:
- core: add `--color` to any Vagrant command to FORCE color output. [GH-2027]
- core: "config.vm.host_name" works again, just an alias to hostname.
- core: Reboots via SSH are now handled gracefully (without exception).
- commands/plugin/install: Post install message of a plugin will be
shown if available. [GH-1986]
- commands/status: cosmetic improvement to better align names and

View File

@ -359,7 +359,12 @@ module VagrantPlugins
end
# Wait for the channel to complete
channel.wait
begin
channel.wait
rescue IOError
@logger.info("SSH connection unexpected closed. Assuming reboot or something.")
exit_status = 0
end
ensure
# Kill the keep-alive thread
keep_alive.kill if keep_alive