From fdb12374e2e075c1907ffbb3c1f203a81d307314 Mon Sep 17 00:00:00 2001 From: Romain Beuque <556072+rbeuque74@users.noreply.github.com> Date: Tue, 21 Apr 2020 15:47:47 +0200 Subject: [PATCH] fix: ssh: Closing net.Conn after SSH finished its execution (#133) Signed-off-by: Romain Beuque --- pkg/plugins/builtin/ssh/ssh.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/plugins/builtin/ssh/ssh.go b/pkg/plugins/builtin/ssh/ssh.go index 5f7a1ccc..04947786 100644 --- a/pkg/plugins/builtin/ssh/ssh.go +++ b/pkg/plugins/builtin/ssh/ssh.go @@ -157,6 +157,7 @@ func execssh(stepName string, i interface{}, ctx interface{}) (interface{}, inte if err != nil { return nil, nil, err } + defer client.Close() session, err := client.NewSession() if err != nil {