From 60f9e182a86b62e53bce76a06a75b35dc305ed10 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Mon, 24 Jun 2024 09:48:03 +0800 Subject: [PATCH] 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. --- protocol7/packet.go | 1 + 1 file changed, 1 insertion(+) diff --git a/protocol7/packet.go b/protocol7/packet.go index 165bac7..f8459c7 100644 --- a/protocol7/packet.go +++ b/protocol7/packet.go @@ -305,6 +305,7 @@ func (packet *Packet) Pack(connection *Session) []byte { Resend: false, Control: true, } + packet.Header.NumChunks = 0 } if packet.Header.Flags.Compression {