mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-08 04:55:56 +08:00
fix conn issue.
This commit is contained in:
parent
9a449519db
commit
39a9194053
@ -1103,7 +1103,10 @@ func (c *QQClient) doHeartbeat() {
|
|||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
sso := packets.BuildSsoPacket(seq, uint32(SystemDeviceInfo.Protocol), "Heartbeat.Alive", SystemDeviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, []byte{}, c.ksid)
|
sso := packets.BuildSsoPacket(seq, uint32(SystemDeviceInfo.Protocol), "Heartbeat.Alive", SystemDeviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, []byte{}, c.ksid)
|
||||||
packet := packets.BuildLoginPacket(c.Uin, 0, []byte{}, sso, []byte{})
|
packet := packets.BuildLoginPacket(c.Uin, 0, []byte{}, sso, []byte{})
|
||||||
_, _ = c.sendAndWait(seq, packet)
|
_, err := c.sendAndWait(seq, packet)
|
||||||
|
if err != nil {
|
||||||
|
_ = c.Conn.Close()
|
||||||
|
}
|
||||||
time.AfterFunc(30*time.Second, c.doHeartbeat)
|
time.AfterFunc(30*time.Second, c.doHeartbeat)
|
||||||
}
|
}
|
||||||
c.heartbeatEnabled = false
|
c.heartbeatEnabled = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user