From 387b23f97d72028911b121f00927857a543194fa Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Mon, 27 Mar 2023 20:29:56 +0800 Subject: [PATCH] update --- modules/gateway/agent.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index 74b540bbf..b14188b33 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -321,8 +321,7 @@ 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() + 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 {