0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-25 12:45:18 +00:00

Clamp packet size on Send<T>

This commit is contained in:
Sanae 2022-02-16 15:07:00 -06:00
parent 860f5c242b
commit b173e53826

View file

@ -39,7 +39,7 @@ public class Client : IDisposable {
Type = Constants.PacketMap[typeof(T)].Type
};
Server.FillPacket(header, packet, memory.Memory);
await Send(memory.Memory, sender);
await Send(memory.Memory[..Constants.MaxPacketSize], sender);
memory.Dispose();
}