mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-07-05 22:03:26 +00:00
fix conn issue.
This commit is contained in:
@ -1103,7 +1103,10 @@ func (c *QQClient) doHeartbeat() {
|
||||
seq := c.nextSeq()
|
||||
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{})
|
||||
_, _ = c.sendAndWait(seq, packet)
|
||||
_, err := c.sendAndWait(seq, packet)
|
||||
if err != nil {
|
||||
_ = c.Conn.Close()
|
||||
}
|
||||
time.AfterFunc(30*time.Second, c.doHeartbeat)
|
||||
}
|
||||
c.heartbeatEnabled = false
|
||||
|
Reference in New Issue
Block a user