Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
1b32f51406
@ -39,7 +39,7 @@ func (this *AgentMgr_Comp) Bind(ctx context.Context, args *pb.AgentBuildReq, rep
|
|||||||
a.(IAgent).Bind(args.UserId, args.WorkerId)
|
a.(IAgent).Bind(args.UserId, args.WorkerId)
|
||||||
} else {
|
} else {
|
||||||
reply.Code = pb.ErrorCode_UserSessionNobeing
|
reply.Code = pb.ErrorCode_UserSessionNobeing
|
||||||
reply.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing)
|
reply.Message = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ func (this *AgentMgr_Comp) UnBind(ctx context.Context, args *pb.AgentUnBuildReq,
|
|||||||
a.(IAgent).UnBind()
|
a.(IAgent).UnBind()
|
||||||
} else {
|
} else {
|
||||||
reply.Code = pb.ErrorCode_UserSessionNobeing
|
reply.Code = pb.ErrorCode_UserSessionNobeing
|
||||||
reply.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing)
|
reply.Message = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ func (this *AgentMgr_Comp) SendMsgToAgent(ctx context.Context, args *pb.AgentSen
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
reply.Code = pb.ErrorCode_UserSessionNobeing
|
reply.Code = pb.ErrorCode_UserSessionNobeing
|
||||||
reply.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing)
|
reply.Message = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ func (this *AgentMgr_Comp) CloseAgent(ctx context.Context, args *pb.AgentCloseeR
|
|||||||
a.(IAgent).Close()
|
a.(IAgent).Close()
|
||||||
} else {
|
} else {
|
||||||
reply.Code = pb.ErrorCode_UserSessionNobeing
|
reply.Code = pb.ErrorCode_UserSessionNobeing
|
||||||
reply.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing)
|
reply.Message = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -135,6 +135,7 @@ func (this *SComp_GateRouteComp) ReceiveMsg(ctx context.Context, args *pb.AgentM
|
|||||||
if code.Code != pb.ErrorCode_Success {
|
if code.Code != pb.ErrorCode_Success {
|
||||||
log.Errorf("HandleUserMsg:%s msg:%v code:%d", args.Method, msg, code)
|
log.Errorf("HandleUserMsg:%s msg:%v code:%d", args.Method, msg, code)
|
||||||
reply.Code = code.Code
|
reply.Code = code.Code
|
||||||
|
reply.Message = pb.GetErrorCodeMsg(code.Code)
|
||||||
if code.Data != nil {
|
if code.Data != nil {
|
||||||
if d, err := jsoniter.Marshal(code.Data); err != nil {
|
if d, err := jsoniter.Marshal(code.Data); err != nil {
|
||||||
log.Errorf("HandleUserMsg:%s msg:%v code:%d err:%v", args.Method, msg, code, err)
|
log.Errorf("HandleUserMsg:%s msg:%v code:%d err:%v", args.Method, msg, code, err)
|
||||||
@ -151,6 +152,7 @@ func (this *SComp_GateRouteComp) ReceiveMsg(ctx context.Context, args *pb.AgentM
|
|||||||
if errcode != pb.ErrorCode_Success {
|
if errcode != pb.ErrorCode_Success {
|
||||||
log.Errorf("HandleUserMsg:%s msg:%v code:%d", args.Method, msg, code)
|
log.Errorf("HandleUserMsg:%s msg:%v code:%d", args.Method, msg, code)
|
||||||
reply.Code = errcode
|
reply.Code = errcode
|
||||||
|
reply.Message = pb.GetErrorCodeMsg(errcode)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user