Merge pull request #1824 from rfjakob/ssh_command_exited

sftp: persist "ssh command exited" error
This commit is contained in:
Alexander Neumann 2018-05-31 21:26:39 +02:00
commit 0fcd9d6926
1 changed files with 3 additions and 1 deletions

View File

@ -75,7 +75,9 @@ func startClient(program string, args ...string) (*SFTP, error) {
go func() {
err := cmd.Wait()
debug.Log("ssh command exited, err %v", err)
ch <- errors.Wrap(err, "cmd.Wait")
for {
ch <- errors.Wrap(err, "ssh command exited")
}
}()
// open the SFTP session