From ab8cc44dc66c8ee35e931230de2250c8dcabc6a8 Mon Sep 17 00:00:00 2001 From: Lonny Wong Date: Sun, 13 Oct 2024 16:18:01 +0800 Subject: [PATCH] fix ServerAliveInterval #150 --- tssh/login.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tssh/login.go b/tssh/login.go index ca5b73c..495b732 100644 --- a/tssh/login.go +++ b/tssh/login.go @@ -1090,8 +1090,7 @@ func sshConnect(args *sshArgs, client SshClient, proxy string) (SshClient, *sshP func keepAlive(client SshClient, args *sshArgs) { getOptionValue := func(option string) int { - value, err := strconv.Atoi(getOptionConfig(args, option)) - if err != nil { + if value, err := strconv.Atoi(getOptionConfig(args, option)); err == nil { return value } return 0