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()