diff --git a/CHANGELOG.md b/CHANGELOG.md index 895b4e32e..f3f1b12ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ BUG FIXES: works properly. [GH-785] - NFS shared folders properly dereference symlinks so that the real path is used, avoiding mount errors [GH-1101] + - SSH channel is closed after the exit status is received, potentially + eliminating any SSH hangs. [GH-603] ## 1.2.3 (July 9, 2013) diff --git a/plugins/communicators/ssh/communicator.rb b/plugins/communicators/ssh/communicator.rb index 2dea21e33..db7111137 100644 --- a/plugins/communicators/ssh/communicator.rb +++ b/plugins/communicators/ssh/communicator.rb @@ -282,6 +282,10 @@ module VagrantPlugins ch2.on_request("exit-status") do |ch3, data| exit_status = data.read_long @logger.debug("Exit status: #{exit_status}") + + # Close the channel, since after the exit status we're + # probably done. This fixes up issues with hanging. + channel.close end # Set the terminal