修复压测bug
This commit is contained in:
parent
4c80b25242
commit
966a34a0d2
@ -149,7 +149,7 @@ func (this *UserSession) Push() (err error) {
|
||||
UserSessionId: this.SessionId,
|
||||
Reply: this.msgqueue,
|
||||
}, nil); err != nil {
|
||||
log.Errorf("SendMsgToUsers:%v err:%v", this, err)
|
||||
log.Errorf("Push:%v err:%s", this, err.Error())
|
||||
}
|
||||
}
|
||||
this.msgqueue = this.msgqueue[:0]
|
||||
|
@ -49,6 +49,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (errd
|
||||
global = this.module.ModuleTools.GetGlobalConf()
|
||||
info = &pb.DBArenaUser{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: session.GetUserId(),
|
||||
Uinfo: comm.GetUserBaseInfo(user),
|
||||
Integral: global.ArenaInitiaIntegral,
|
||||
Streak: 0,
|
||||
|
@ -99,7 +99,7 @@ func (this *ModuleRobot_MainLine) DoPipeline(robot IRobot) (err error) {
|
||||
return
|
||||
}
|
||||
break
|
||||
case 0, 2, 3, 5, 7:
|
||||
case 0, 2, 3, 5, 6, 7:
|
||||
if _, errdata = robot.SendMessage("mainline", "levelpass", &pb.MainlineLevelPassReq{Level: conf.Id}); errdata != nil {
|
||||
err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
|
||||
return
|
||||
|
@ -60,6 +60,7 @@ func (this *ModuleRobot_Shop) DoPipeline(robot IRobot) (err error) {
|
||||
err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
|
||||
return
|
||||
}
|
||||
v.LeftBuyNum--
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ func (this *ModuleRobot_WTask) Receive(robot IRobot, stype string, message proto
|
||||
break
|
||||
case "acceptchange":
|
||||
resp := message.(*pb.WTaskAcceptChangePush)
|
||||
// log.Debug("[机器人 WTask-AcceptChange]", log.Field{Key: "Account", Value: robot.Account()}, log.Field{Key: "Resp", Value: resp.String()})
|
||||
log.Debug("[机器人 WTask-AcceptChange]", log.Field{Key: "Account", Value: robot.Account()}, log.Field{Key: "Resp", Value: resp.String()})
|
||||
this.progress = resp.Accepts
|
||||
if this.info != nil {
|
||||
this.info.Accepts = make([]int32, 0)
|
||||
|
@ -188,13 +188,12 @@ func (this *configureComp) GetPlayerOverview(id string, sex int32) (configure *c
|
||||
)
|
||||
key = fmt.Sprintf("%s%d", id, sex)
|
||||
if configure, ok = this._pInforoverview[key]; !ok {
|
||||
key = fmt.Sprintf("%s%d", id, 0)
|
||||
if configure, ok = this._pInforoverview[key]; !ok {
|
||||
err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
|
||||
// key = fmt.Sprintf("%s%d", id, 0)
|
||||
// if configure, ok = this._pInforoverview[key]; !ok {
|
||||
err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
// }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ func writeServiceConfig(filename string, sseting *core.ServiceSttings) (err erro
|
||||
func parseaddr(addr string) (ip string, port int, err error) {
|
||||
ss := strings.Split(addr, ":")
|
||||
if len(ss) != 2 {
|
||||
err = fmt.Errorf("addr:%s解析异常", addr)
|
||||
err = fmt.Errorf("addr:%s解析异常!", addr)
|
||||
return
|
||||
}
|
||||
address := net.ParseIP(ss[0])
|
||||
|
@ -22,7 +22,7 @@ func (this *ServiceBase) InitSys() {
|
||||
this.RPCXService.InitSys()
|
||||
//初始化配置中心系统 每个服务都会用到的就在这个初始化就好
|
||||
if err := configure.OnInit(this.GetSettings().Sys["configure"]); err != nil {
|
||||
panic(fmt.Sprintf("init sys.configure err: %s", err.Error()))
|
||||
panic(fmt.Sprintf("init sys.configure err: %s !", err.Error()))
|
||||
} else {
|
||||
configure.Start()
|
||||
log.Infof("init sys.configure success!")
|
||||
|
Loading…
Reference in New Issue
Block a user