From 8b294dd1ca3ecc961477bc47a0b82f988db3e507 Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Sun, 19 Nov 2023 15:07:14 +0100 Subject: [PATCH] fix: disconnect on delete packet reason: using statement with the session --- Server/PacketHandlers/CharacterDeletionHandler.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Server/PacketHandlers/CharacterDeletionHandler.cs b/Server/PacketHandlers/CharacterDeletionHandler.cs index a849f46..3d1afaa 100644 --- a/Server/PacketHandlers/CharacterDeletionHandler.cs +++ b/Server/PacketHandlers/CharacterDeletionHandler.cs @@ -17,8 +17,7 @@ public class CharacterDeletionHandler : IPacketHandler public async Task HandleAsync(CharacterDeletePacket packet, TcpSession session) { - using var authSession = session as AuthSession; - if (authSession == null) + if (session is not AuthSession authSession) { session.Disconnect(); return;