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

This commit is contained in:
dushixiang committed 2021-02-12 16:55:07 +08:00
1 parent 29fb520e48
commit 32b31eba1a
13 files changed
+697 -569

No files matched your search

+7 -2
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()
}
}
}