Fix cached packet order

This commit is contained in:
世界 2023-04-26 05:12:21 +08:00
parent 0c037cb0e2
commit a23ffbaeb5
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -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
}
}