From eda8d58118cc192db273d71a105af30f57a3f4cf Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 18 Aug 2022 10:41:45 +0800 Subject: [PATCH 1/3] update --- cmd/v2/readme.md | 2 ++ modules/user/api_login.go | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/v2/readme.md b/cmd/v2/readme.md index 2eee84dac..26f763a91 100644 --- a/cmd/v2/readme.md +++ b/cmd/v2/readme.md @@ -1,5 +1,7 @@ ## install tool + + go install fyne.io/fyne/v2/cmd/fyne@latest ## install font diff --git a/modules/user/api_login.go b/modules/user/api_login.go index 9c7425142..c7757790d 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -80,7 +80,9 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod } //缓存user session - err = this.module.modelSession.ChangeList("online", user.Uid, map[string]interface{}{ + + // this.module.modelSession.Get(user.Uid, data interface{}) + err = this.module.modelSession.AddList("online", user.Uid, map[string]interface{}{ "uid": user.Uid, "sessionId": session.GetSessionId(), "serviceTag": session.GetServiecTag(), From 5da57b76ec026e89ecdfd1f47b689457de80f05b Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 18 Aug 2022 10:45:45 +0800 Subject: [PATCH 2/3] update --- modules/user/api_login.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/user/api_login.go b/modules/user/api_login.go index c7757790d..4101f0a08 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -80,8 +80,6 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod } //缓存user session - - // this.module.modelSession.Get(user.Uid, data interface{}) err = this.module.modelSession.AddList("online", user.Uid, map[string]interface{}{ "uid": user.Uid, "sessionId": session.GetSessionId(), From d56453ebb2b58c4249197db9de22da983d28ffcd Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 18 Aug 2022 11:05:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=A7=BB=E9=99=A4socket=20=E8=BF=87?= =?UTF-8?q?=E6=9C=9F=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=90=8E=E9=9D=A2=E5=8A=A0?= =?UTF-8?q?=E5=BF=83=E8=B7=B3=E6=9C=BA=E5=88=B6=E5=90=8E=E5=86=8D=E8=A1=A5?= =?UTF-8?q?=E4=B8=8A=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gateway/agent.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index a83cfd675..e892e6813 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -36,7 +36,6 @@ 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() @@ -70,7 +69,6 @@ locp: go this.Close() break locp } - if err = proto.Unmarshal(data, msg); err != nil { this.gateway.Errorf("agent:%s uId:%s Unmarshal err:%v", this.sessionId, this.uId, err) go this.Close()