上传网关错误信息
This commit is contained in:
parent
1b9c52d6c6
commit
a1ceea9b91
@ -140,7 +140,7 @@ locp:
|
||||
ReqSubType: msg.SubType,
|
||||
Arg: msg.Data,
|
||||
Code: pb.ErrorCode_GatewayException,
|
||||
Err: &pb.ErrorData{Title: "用户消息处理失败!", Datastring: err.Error()},
|
||||
Err: &pb.ErrorData{Code: pb.ErrorCode_GatewayException, Title: pb.ErrorCode_GatewayException.String(), Message: err.Error()},
|
||||
})
|
||||
err = this.WriteMsg(&pb.UserMessage{
|
||||
MsgId: msg.MsgId,
|
||||
@ -368,7 +368,7 @@ func (this *Agent) HandleMessage(msg *pb.UserMessage) (err error) {
|
||||
ReqSubType: msg.SubType,
|
||||
Arg: msg.Data,
|
||||
Code: pb.ErrorCode_GatewayException,
|
||||
Err: &pb.ErrorData{Title: "用户消息处理失败!", Datastring: err.Error()},
|
||||
Err: &pb.ErrorData{Code: pb.ErrorCode_GatewayException, Title: pb.ErrorCode_GatewayException.String(), Message: err.Error()},
|
||||
})
|
||||
err = this.WriteMsg(&pb.UserMessage{
|
||||
MsgId: msg.MsgId,
|
||||
|
@ -63,10 +63,14 @@ func (this *ModuleRobot_Arena) DoPipeline(robot IRobot) (err error) {
|
||||
}
|
||||
heromodule = robot.GetModule(comm.ModuleHero).(*ModuleRobot_Hero)
|
||||
heros = heromodule.getbattlehero()
|
||||
|
||||
for _, v := range this.players {
|
||||
player = v
|
||||
break
|
||||
}
|
||||
if player == nil {
|
||||
return
|
||||
}
|
||||
if resp, errdata = robot.SendMessage("arena", "challenge", &pb.ArenaChallengeReq{
|
||||
Playerid: player.Uid,
|
||||
Isai: player.Isai,
|
||||
|
@ -85,11 +85,6 @@ func (this *ModuleRobot_WTask) Receive(robot IRobot, stype string, message proto
|
||||
return
|
||||
}
|
||||
func (this *ModuleRobot_WTask) OncePipeline(robot IRobot) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
//机器人执行流
|
||||
func (this *ModuleRobot_WTask) DoPipeline(robot IRobot) (err error) {
|
||||
var (
|
||||
errdata *pb.ErrorData
|
||||
)
|
||||
@ -98,10 +93,16 @@ func (this *ModuleRobot_WTask) DoPipeline(robot IRobot) (err error) {
|
||||
err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//机器人执行流
|
||||
func (this *ModuleRobot_WTask) DoPipeline(robot IRobot) (err error) {
|
||||
var (
|
||||
tconf *cfg.GameWorldTaskData
|
||||
cconf *cfg.GameBuriedCondiData
|
||||
module core.M_Modules
|
||||
errdata *pb.ErrorData
|
||||
tconf *cfg.GameWorldTaskData
|
||||
cconf *cfg.GameBuriedCondiData
|
||||
module core.M_Modules
|
||||
)
|
||||
locp:
|
||||
for {
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/utils"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
@ -254,6 +255,7 @@ func (this *Robot) run() {
|
||||
log.Error("[机器人 初始执行错误]", log.Field{Key: "Account", Value: this.account}, log.Field{Key: "module", Value: v}, log.Field{Key: "err", Value: err.Error()})
|
||||
break
|
||||
}
|
||||
time.Sleep(time.Millisecond * time.Duration(2000+rand.Int31n(3000)))
|
||||
}
|
||||
|
||||
for this.cycle {
|
||||
@ -275,6 +277,7 @@ func (this *Robot) run() {
|
||||
this.cycle = true
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Millisecond * time.Duration(2000+rand.Int31n(3000)))
|
||||
}
|
||||
}
|
||||
this.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user