aboutsummaryrefslogtreecommitdiff
path: root/session.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-10-30 21:59:17 +0700
committerShulhan <ms@kilabit.info>2023-10-30 22:00:34 +0700
commit209e9ddd1d49fd6b9384fa0dab27760480fba442 (patch)
treebbf96f0073f71329b4913a38138b05199b9692a0 /session.go
parenta4df1481d6108731e231750721e4d2cfe0cee8bd (diff)
downloadawwan-209e9ddd1d49fd6b9384fa0dab27760480fba442.tar.xz
all: pass Request when creating new SSH client
Instead of passing stdout and stderr as "io.Writer", pass the Request, so we can log using the Request mlog. While at it, return error from sshClient rmdirAll so the caller can log the error.
Diffstat (limited to 'session.go')
-rw-r--r--session.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/session.go b/session.go
index 583b115..c0e5625 100644
--- a/session.go
+++ b/session.go
@@ -620,7 +620,7 @@ func (ses *Session) initSSHClient(req *Request, sshSection *config.Section) (err
lastIdentFile = sshSection.IdentityFile[len(sshSection.IdentityFile)-1]
}
- ses.sshc, err = newSshClient(sshSection, ses.dirTmp, req.mlog, req.mlog)
+ ses.sshc, err = newSshClient(req, sshSection, ses.dirTmp)
if err != nil {
return fmt.Errorf(`%s: %w`, logp, err)
}