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