修复代码语法错误

This commit is contained in:
liwei1dao 2023-10-08 15:11:55 +08:00
parent aa4bd8ad9b
commit 93972c5b6c
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)