From 6a0b4a11769857e513bc14cdc790cce739b2a63c Mon Sep 17 00:00:00 2001 From: Eric_Lee Date: Fri, 28 Jul 2023 11:04:03 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=A7=BB=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=20ssh=20session=20=E8=BF=9E=E6=8E=A5=20(#178?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * perf: 移除不必要的 ssh session 连接 --------- Co-authored-by: Eric --- backend/app/api/v1/terminal.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/backend/app/api/v1/terminal.go b/backend/app/api/v1/terminal.go index 24b7316fb..7a2002d31 100644 --- a/backend/app/api/v1/terminal.go +++ b/backend/app/api/v1/terminal.go @@ -55,12 +55,7 @@ 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) { return