From f2d792a8be6c58b00dc9572007a83b0c53d7412f Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 18 Aug 2022 10:26:25 +0800 Subject: [PATCH 1/3] update --- .gitignore | 3 ++- cmd/v2/ui/app_gen.go | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 663906327..9b0924393 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,5 @@ pb/proto ~$*.xlsx *.pid cmd/luban/ -pb.bat \ No newline at end of file +pb.bat +cmd/v2/.cache.meta diff --git a/cmd/v2/ui/app_gen.go b/cmd/v2/ui/app_gen.go index e6a75d723..9165ec522 100644 --- a/cmd/v2/ui/app_gen.go +++ b/cmd/v2/ui/app_gen.go @@ -70,6 +70,8 @@ func (this *appGen) LazyInit(obs observer.Observer) error { genType.PlaceHolder = "生成类型" form := widget.NewForm( + widget.NewFormItem("服务地址", serverAddr), + widget.NewFormItem("项目目录", projectDir), widget.NewFormItem("工作目录", workDir), widget.NewFormItem("Client", client), widget.NewFormItem("输入目录", inputDir), From ad390040d77a75d05da95719d883b0bcb3d4ae3a Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 18 Aug 2022 10:28:31 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B9=BF=E6=92=AD=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E4=B8=8D=E5=8F=91=E9=80=81=E6=9C=AA=E7=99=BB=E5=BD=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gateway/agentmgr_comp.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/gateway/agentmgr_comp.go b/modules/gateway/agentmgr_comp.go index 5a071e353..fe4960c80 100644 --- a/modules/gateway/agentmgr_comp.go +++ b/modules/gateway/agentmgr_comp.go @@ -137,7 +137,10 @@ func (this *AgentMgrComp) SendMsgToAgents(ctx context.Context, args *pb.BatchMes this.module.Debugf("SendMsgToAgents: agents:%v msg:%v", args.UserSessionIds, msg) for _, v := range args.UserSessionIds { if a, ok := this.agents.Load(v); ok { - a.(IAgent).WriteMsg(msg) + agent := a.(IAgent) + if agent.UserId() != "" { //自发送登录用户 + agent.WriteMsg(msg) + } } } return nil From 58e8c9002d67f625b45045aa1e42a73464e99802 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 18 Aug 2022 10:32:47 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0socket=20=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E8=B6=85=E6=97=B6=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gateway/agent.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index dd533764a..a83cfd675 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -36,6 +36,7 @@ func newAgent(gateway IGateway, conn *websocket.Conn) *Agent { closeSignal: make(chan bool), state: 1, } + conn.SetReadDeadline(time.Now().Add(time.Minute)) //一分钟内不登录 自动断开连接 agent.wg.Add(2) go agent.readLoop() go agent.writeLoop()