From da244a370982d2edb79e965e9c98a07feac0b102 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 13 Jan 2024 16:58:36 +0000 Subject: [PATCH] ssh: shorten wait delay for external ssh binaries now that we are using go1.20 Now we are guaranteed to have go1.20 or later we can use the WaitDelay flag when running external ssh binaries. --- backend/sftp/ssh_external.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/sftp/ssh_external.go b/backend/sftp/ssh_external.go index 0ac5e6539..bbea27ea8 100644 --- a/backend/sftp/ssh_external.go +++ b/backend/sftp/ssh_external.go @@ -10,6 +10,7 @@ import ( "io" "os/exec" "strings" + "time" "github.com/rclone/rclone/fs" ) @@ -93,8 +94,7 @@ func (f *Fs) newSSHSessionExternal() *sshSessionExternal { s.cmd = exec.CommandContext(ctx, ssh[0], ssh[1:]...) // Allow the command a short time only to shut down - // FIXME enable when we get rid of go1.19 - // s.cmd.WaitDelay = time.Second + s.cmd.WaitDelay = time.Second return s }