移除socket 过期代码,后面加心跳机制后再补上去

This commit is contained in:
liwei1dao 2022-08-18 11:05:25 +08:00
parent 58e8c9002d
commit d56453ebb2

View File

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