perf: 移除不必要的 ssh session 连接 (#1780)

* perf: 移除不必要的 ssh session 连接

---------

Co-authored-by: Eric <xplv@126.com>
This commit is contained in:
Eric_Lee 2023-07-28 11:04:03 +08:00 committed by GitHub
parent 7a67377aa9
commit 6a0b4a1176
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,11 +55,6 @@ func (b *BaseApi) WsSsh(c *gin.Context) {
return
}
defer client.Close()
ssConn, err := connInfo.NewSshConn(cols, rows)
if wshandleError(wsConn, err) {
return
}
defer ssConn.Close()
sws, err := terminal.NewLogicSshWsSession(cols, rows, true, connInfo.Client, wsConn)
if wshandleError(wsConn, err) {