From 726ceecc720b617295c72641fc0393ee30bfb9e7 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Mon, 19 Sep 2022 10:05:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=8F=E8=AE=AEtype?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/v2/ui/tool_term.go | 5 ++++- modules/rtask/api_choose.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/v2/ui/tool_term.go b/cmd/v2/ui/tool_term.go index 546bfcc2f..8e86fbb5a 100644 --- a/cmd/v2/ui/tool_term.go +++ b/cmd/v2/ui/tool_term.go @@ -154,7 +154,10 @@ func (a *appTerm) OnClose() bool { if !b { return } - a.sshService.Client.Close() + if a.sshService.Client != nil { + a.sshService.Client.Close() + } + }, toolWin.w) return true } diff --git a/modules/rtask/api_choose.go b/modules/rtask/api_choose.go index 9437abae3..df1694f9a 100644 --- a/modules/rtask/api_choose.go +++ b/modules/rtask/api_choose.go @@ -93,7 +93,7 @@ func (this *apiComp) Choose(session comm.IUserSession, req *pb.RtaskChooseReq) ( rsp := &pb.RtaskFinishPush{ RtaskId: req.RtaskId, } - if err := session.SendMsg(string(this.moduleRtask.GetType()), RtaskSubTypeChoose, rsp); err != nil { + if err := session.SendMsg(string(this.moduleRtask.GetType()), "finish", rsp); err != nil { code = pb.ErrorCode_SystemError } }