communicators/ssh: cleaner error if remote disconnect [GH-4038]
This commit is contained in:
parent
a08d9078da
commit
5ed0b22c78
|
@ -27,6 +27,7 @@ BUG FIXES:
|
|||
- core: Fix crash case when destroying with an invalid provisioner. [GH-4281]
|
||||
- commands/package: base package won't crash with exception [GH-4017]
|
||||
- commands/rsync-auto: Destroyed machines won't raise exceptions. [GH-4031]
|
||||
- communicators/ssh: Nicer error if remote unexpectedly disconects. [GH-4038]
|
||||
- communicators/winrm: Support `mkdir` [GH-4271]
|
||||
- guests/centos: Fix issues when NFS client is installed by restarting
|
||||
NFS [GH-4088]
|
||||
|
|
|
@ -517,8 +517,11 @@ module VagrantPlugins
|
|||
begin
|
||||
channel.wait
|
||||
rescue Errno::ECONNRESET, IOError
|
||||
@logger.info("SSH connection unexpected closed. Assuming reboot or something.")
|
||||
@logger.info(
|
||||
"SSH connection unexpected closed. Assuming reboot or something.")
|
||||
exit_status = 0
|
||||
rescue Net::SSH::Disconnect
|
||||
raise Vagrant::Errors::SSHDisconnected
|
||||
end
|
||||
ensure
|
||||
# Kill the keep-alive thread
|
||||
|
|
Loading…
Reference in New Issue