From d56453ebb2b58c4249197db9de22da983d28ffcd Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 18 Aug 2022 11:05:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4socket=20=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=90=8E=E9=9D=A2=E5=8A=A0=E5=BF=83?= =?UTF-8?q?=E8=B7=B3=E6=9C=BA=E5=88=B6=E5=90=8E=E5=86=8D=E8=A1=A5=E4=B8=8A?= =?UTF-8?q?=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gateway/agent.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index a83cfd675..e892e6813 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -36,7 +36,6 @@ func newAgent(gateway IGateway, conn *websocket.Conn) *Agent { closeSignal: make(chan bool), state: 1, } - conn.SetReadDeadline(time.Now().Add(time.Minute)) //一分钟内不登录 自动断开连接 agent.wg.Add(2) go agent.readLoop() go agent.writeLoop() @@ -70,7 +69,6 @@ locp: go this.Close() break locp } - if err = proto.Unmarshal(data, msg); err != nil { this.gateway.Errorf("agent:%s uId:%s Unmarshal err:%v", this.sessionId, this.uId, err) go this.Close()