summaryrefslogtreecommitdiff
path: root/knife
diff options
context:
space:
mode:
authorgscho <greg.c.schofield@gmail.com>2021-04-22 14:42:32 -0400
committergscho <greg.c.schofield@gmail.com>2021-04-22 14:44:50 -0400
commit4fbc73901f0c7a19b0d16c879b8d6cb25210d5d1 (patch)
treecaf870907e7662af72570a281ee3b227d27654dc /knife
parent262d718d8bb0db5bec311ac1b8ecd07e869be364 (diff)
downloadchef-4fbc73901f0c7a19b0d16c879b8d6cb25210d5d1.tar.gz
Ensure subsession gets closed
Signed-off-by: gscho <greg.c.schofield@gmail.com>
Diffstat (limited to 'knife')
-rw-r--r--knife/lib/chef/knife/ssh.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/knife/lib/chef/knife/ssh.rb b/knife/lib/chef/knife/ssh.rb
index e69de62bc2..bac88b7d50 100644
--- a/knife/lib/chef/knife/ssh.rb
+++ b/knife/lib/chef/knife/ssh.rb
@@ -398,6 +398,8 @@ class Chef
end
session.loop
exit_status
+ ensure
+ subsession.close
end
def get_password