Always set num chunks to 0 in control packets

This is what the reference implementation expects.
Otherwise it tries to call FetchChunk and fails to parse the header.
This commit is contained in:
ChillerDragon 2024-06-24 09:48:03 +08:00
parent 98c01516e5
commit 60f9e182a8

View file

@ -305,6 +305,7 @@ func (packet *Packet) Pack(connection *Session) []byte {
Resend: false,
Control: true,
}
packet.Header.NumChunks = 0
}
if packet.Header.Flags.Compression {