优化接入功能&重构接入文件操作

This commit is contained in:
dushixiang
2021-02-02 23:06:50 +08:00
parent 29fb520e48
commit 32b31eba1a
13 changed files with 697 additions and 569 deletions

View File

@ -20,8 +20,13 @@ func (r *Tun) Close() {
if r.Protocol == "rdp" || r.Protocol == "vnc" {
_ = r.Tunnel.Close()
} else {
_ = r.SshClient.Close()
_ = r.SftpClient.Close()
if r.SshClient != nil {
_ = r.SshClient.Close()
}
if r.SftpClient != nil {
_ = r.SftpClient.Close()
}
}
}