上传扫荡正式接入问题
This commit is contained in:
parent
55ae53c03a
commit
522577fc1f
@ -107,14 +107,24 @@ locp:
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *client) handleresponse(resp *pb.BattleRpcMessage) {
|
func (this *client) handleresponse(resp *pb.BattleRpcMessage) {
|
||||||
var call *MessageCall
|
var (
|
||||||
|
call *MessageCall
|
||||||
|
ok bool
|
||||||
|
)
|
||||||
|
|
||||||
if resp.Rid != 0 {
|
if resp.Rid != 0 {
|
||||||
this.pendingmutex.Lock()
|
this.pendingmutex.Lock()
|
||||||
call = this.pending[resp.Rid]
|
call, ok = this.pending[resp.Rid]
|
||||||
delete(this.pending, resp.Rid)
|
if ok {
|
||||||
|
delete(this.pending, resp.Rid)
|
||||||
|
}
|
||||||
this.pendingmutex.Unlock()
|
this.pendingmutex.Unlock()
|
||||||
call.Error = resp.Data.UnmarshalTo(call.Reply)
|
if ok {
|
||||||
call.done(this.log)
|
call.Error = resp.Data.UnmarshalTo(call.Reply)
|
||||||
|
call.done(this.log)
|
||||||
|
} else {
|
||||||
|
this.log.Warnf("C# Reply ON Fiund Method:%s Rid:%s", resp.Method, resp.Rid)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
switch resp.Method {
|
switch resp.Method {
|
||||||
case "BattleOutCmd": //输出指令
|
case "BattleOutCmd": //输出指令
|
||||||
|
@ -696,8 +696,7 @@ func (this *Battle) RunServerBattle(session comm.IUserSession, req *pb.BattleRun
|
|||||||
ctx context.Context
|
ctx context.Context
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
// if this.options.OpenCheck {
|
if this.options.OpenCheck {
|
||||||
if false {
|
|
||||||
stime := time.Now()
|
stime := time.Now()
|
||||||
ctx, _ = context.WithTimeout(context.Background(), time.Second*5)
|
ctx, _ = context.WithTimeout(context.Background(), time.Second*5)
|
||||||
if reply, err = this.clientmgr.RunBattle(ctx, req); err != nil {
|
if reply, err = this.clientmgr.RunBattle(ctx, req); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user