Skip to content

Commit

Permalink
fix: Ensure SSH connections are closed after each command execution
Browse files Browse the repository at this point in the history
This commit addresses an issue where SSH connections were not being properly closed after each command execution, leading to timeout errors during the `kamal deploy` process.
  • Loading branch information
jfanals authored Jun 24, 2024
1 parent ff03891 commit 56342dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/kamal/sshkit_with_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def execute
rescue ::StandardError => e
e2 = SSHKit::Runner::ExecuteError.new e
raise e2, "Exception while executing #{host.user ? "as #{host.user}@" : "on host "}#{host}: #{e.message}"
ensure
SSHKit::Backend::Netssh.pool.close_connections
end
end

Expand Down

0 comments on commit 56342dc

Please sign in to comment.