From a23ffbaeb5b9a3cacdedbce8f1a663b8e22ec2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 26 Apr 2023 05:12:21 +0800 Subject: [PATCH] Fix cached packet order --- common/bufio/copy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bufio/copy.go b/common/bufio/copy.go index ef42b31..00d78b0 100644 --- a/common/bufio/copy.go +++ b/common/bufio/copy.go @@ -255,7 +255,7 @@ func CopyPacket(destinationConn N.PacketWriter, source N.PacketReader) (n int64, if cachedReader, isCached := source.(N.CachedPacketReader); isCached { packet := cachedReader.ReadCachedPacket() if packet != nil { - cachedPackets = append([]*N.PacketBuffer{packet}, cachedPackets...) + cachedPackets = append(cachedPackets, packet) continue } }