From 93972c5b6c23be1777cd8bf47c5f33ef2cc5e3f0 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Sun, 8 Oct 2023 15:11:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/usersession.go | 2 +- modules/user/model_user.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/comm/usersession.go b/comm/usersession.go index 93c22aa6b..f22d9eef6 100644 --- a/comm/usersession.go +++ b/comm/usersession.go @@ -126,7 +126,7 @@ func (this *UserSession) SendMsg(mainType, subType string, msg proto.Message) (e // 关闭用户连接对象 func (this *UserSession) Close() (err error) { reply := &pb.RPCMessageReply{} - if err := this.service.RpcCall(context.Background(), fmt.Sprintf("%s/%s", Service_Gateway, this.GatewayServiceId), string(Rpc_GatewayAgentClose), &pb.AgentCloseeReq{ + if err = this.service.RpcCall(context.Background(), fmt.Sprintf("%s/%s", Service_Gateway, this.GatewayServiceId), string(Rpc_GatewayAgentClose), &pb.AgentCloseeReq{ UserSessionId: this.SessionId, }, reply); err != nil { log.Errorf("Close UserSession:%s UserId:%s err:%v", this.SessionId, this.UserId, err) diff --git a/modules/user/model_user.go b/modules/user/model_user.go index 7c9d9d93e..eaa217134 100644 --- a/modules/user/model_user.go +++ b/modules/user/model_user.go @@ -81,7 +81,7 @@ func (this *ModelUser) User_Create(user *pb.DBUser) (err error) { user.Ctime = now user.Logintime = now if _, err = this.DB.InsertOne(comm.TableUser, user); err != nil { - this.module.Errorln("创建用户", log.Field{Key: "sid", Value: user.Sid}, log.Field{Key: "account", Value: user.Binduid}, log.Field{Key: "err", Value: err.Error()}) + this.module.Error("创建用户", log.Field{Key: "sid", Value: user.Sid}, log.Field{Key: "account", Value: user.Binduid}, log.Field{Key: "err", Value: err.Error()}) return } key := fmt.Sprintf("%s:%s", this.TableName, user.Uid)