Clamp packet size on Send<T>

This commit is contained in:
Sanae 2022-02-16 15:07:00 -06:00
parent 860f5c242b
commit b173e53826
1 changed files with 1 additions and 1 deletions

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();
}