上传socket 读取超时设置
This commit is contained in:
parent
911c17bcf7
commit
58e8c9002d
@ -36,6 +36,7 @@ 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()
|
||||
|
Loading…
Reference in New Issue
Block a user