diff --git a/Chaos.Networking/Abstractions/ServerBase.cs b/Chaos.Networking/Abstractions/ServerBase.cs index 6faf636..10ea7bd 100644 --- a/Chaos.Networking/Abstractions/ServerBase.cs +++ b/Chaos.Networking/Abstractions/ServerBase.cs @@ -147,10 +147,9 @@ public virtual ValueTask HandlePacketAsync(T client, in ClientPacket packet) { var handler = ClientHandlers[(byte)packet.OpCode]; - if (handler is null) - return default; - - return handler(client, in packet); + if (handler is not null) return handler(client, in packet); + client.Disconnect(); + return default; } ///