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:
parent
1607cdf2bf
commit
c1be499251
@ -46,9 +46,10 @@ type QQClient struct {
|
|||||||
Conn net.Conn
|
Conn net.Conn
|
||||||
ConnectTime time.Time
|
ConnectTime time.Time
|
||||||
|
|
||||||
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user