1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-06-19 14:05:04 +08:00

fix protocol error.

This commit is contained in:
Mrs4s 2020-09-17 08:50:02 +08:00
parent 1607cdf2bf
commit c1be499251

View File

@ -49,6 +49,7 @@ type QQClient struct {
decoders map[string]func(*QQClient, uint16, []byte) (interface{}, error) decoders map[string]func(*QQClient, uint16, []byte) (interface{}, error)
handlers sync.Map handlers sync.Map
server *net.TCPAddr server *net.TCPAddr
currServerIndex int32
syncCookie []byte syncCookie []byte
pubAccountCookie []byte pubAccountCookie []byte
@ -1055,8 +1056,6 @@ func (c *QQClient) doHeartbeat() {
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) _, _ = c.sendAndWait(seq, packet)
_, pkt := c.buildGetMessageRequestPacket(msg.SyncFlag_START, time.Now().Unix())
c.send(pkt)
time.AfterFunc(30*time.Second, c.doHeartbeat) time.AfterFunc(30*time.Second, c.doHeartbeat)
} }
} }