From ea11b690da9a7143481129ba3a5626f7c5bc2efa Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 10 Mar 2023 14:39:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=BF=83=E8=B7=B3=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gateway/agent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index 7ca867f8f..430b8c0d1 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -79,6 +79,7 @@ locp: go this.Close() break locp } else { + this.wsConn.SetReadDeadline(time.Now().Add(time.Second * 60)) // 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{ @@ -89,7 +90,6 @@ locp: SubType: "heartbeat", Data: data, }) - this.wsConn.SetReadDeadline(time.Now().Add(time.Second * 30)) continue } var code pb.ErrorCode