- 修复ssh连接协程泄漏的问题

This commit is contained in:
dushixiang 2022-05-05 11:03:00 +08:00
parent b73bef0c08
commit f3a78761c8

View File

@ -80,21 +80,21 @@ func (ret *NextTerminal) Write(p []byte) (int, error) {
}
func (ret *NextTerminal) Close() error {
if ret.SftpClient != nil {
return ret.SftpClient.Close()
_ = ret.SftpClient.Close()
}
if ret.SshSession != nil {
return ret.SshSession.Close()
_ = ret.SshSession.Close()
}
if ret.SshClient != nil {
return ret.SshClient.Close()
_ = ret.SshClient.Close()
}
if ret.Recorder != nil {
return ret.Close()
ret.Recorder.Close()
}
return nil