Quick stability fix trollface
This commit is contained in:
parent
9b2d508a20
commit
d0f060fab5
|
@ -184,11 +184,13 @@ public class Server {
|
|||
client.CurrentCostume = costumePacket;
|
||||
}
|
||||
|
||||
{
|
||||
try {
|
||||
if (header.Type is not PacketType.Cap and not PacketType.Player) Logger.Warn($"lol {header.Type}");
|
||||
IPacket packet = (IPacket) Activator.CreateInstance(Constants.PacketIdMap[header.Type])!;
|
||||
packet.Deserialize(memory.Memory.Span[Constants.HeaderSize..]);
|
||||
PacketHandler?.Invoke(client, packet);
|
||||
} catch {
|
||||
// ignore failed packet deserialization!
|
||||
}
|
||||
|
||||
await Broadcast(memory, client);
|
||||
|
|
Loading…
Reference in New Issue