Skip to content

Commit 9db4a2b

Browse files
committed
fix: mender-artifact hangs when ssh connection fails silently
Ticket: MEN-8429 Changelog: Fix for mender-artifact waiting indefinitely if ssh connection fails silently. Now it drops after 30 seconds. Signed-off-by: Michal Kopczan <[email protected]>
1 parent f2b5941 commit 9db4a2b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cli/util/ssh.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ func StartSSHCommand(c *cli.Context,
7373
args = append(args, userAtHost)
7474
args = append(
7575
args,
76+
"-o ServerAliveInterval=30",
77+
"-o ServerAliveCountMax=1",
7678
"/bin/sh",
7779
"-c",
7880
command)

0 commit comments

Comments
 (0)