更改设置心跳断线时机
This commit is contained in:
parent
ec3610dc6e
commit
d27ece2da0
@ -70,7 +70,7 @@ locp:
|
||||
go this.Close()
|
||||
break locp
|
||||
}
|
||||
this.wsConn.SetReadDeadline(time.Now().Add(time.Second * 30))
|
||||
|
||||
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()
|
||||
@ -88,6 +88,7 @@ locp:
|
||||
SubType: "heartbeat",
|
||||
Data: data,
|
||||
})
|
||||
this.wsConn.SetReadDeadline(time.Now().Add(time.Second * 30))
|
||||
continue
|
||||
}
|
||||
if err := this.messageDistribution(msg); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user