diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index a223ac530..cfea8d01b 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -77,7 +77,7 @@ locp: go this.Close() break locp } else { - // this.gateway.Debugf("----------1 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) + this.gateway.Debugf("----------1 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) if msg.MainType == string(comm.ModuleGate) { //心跳消息 无需校验秘钥 data, _ := anypb.New(&pb.GatewayHeartbeatResp{ Timestamp: configure.Now().Unix(), @@ -93,7 +93,7 @@ locp: var code pb.ErrorCode code, err = this.secAuth(msg) if err == nil { - // this.gateway.Debugf("----------2 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) + this.gateway.Debugf("----------2 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) if err := this.messageDistribution(msg); err != nil { this.gateway.Errorf("messageDistribution err:%v", err) go this.Close() @@ -303,9 +303,8 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) { } } stime := time.Now() - // this.gateway.Debugf("----------3 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) - // ctx, _ := context.WithTimeout(context.Background(), time.Second*5) - ctx := context.Background() + this.gateway.Debugf("----------3 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) + ctx, _ := context.WithTimeout(context.Background(), time.Second*5) if len(serviceTag) == 0 { // this.gateway.Debugf("----------4 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) if err = this.gateway.Service().RpcCall(ctx, servicePath, string(comm.Rpc_GatewayRoute), req, reply); err != nil {