mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-07 12:43:32 +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()
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user