mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-22 03:05:16 +00:00
Quick stability fix trollface
This commit is contained in:
parent
9b2d508a20
commit
d0f060fab5
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue