Avoid hard closing/crashing interative clients on SSH dialing failures

This commit is contained in:
2025-01-12 20:47:20 -05:00
parent 5028fb21b0
commit 1c650d4751
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ func GetSSHClient(manualSync bool) (*ssh.Client, string, bool) {
sshClient, err := ssh.Dial("tcp", ip+":"+port, sshConfig)
if err != nil {
fmt.Println(core.AnsiError+"Sync failed - Unable to connect to remote server:", err.Error()+core.AnsiReset)
os.Exit(core.ErrorServerConnection)
core.Exit(core.ErrorServerConnection) // do not close/crash interactive clients
}
return sshClient, entryRoot, isWindows