fix: disconnect on delete packet

reason: using statement with the session
This commit is contained in:
Timothy Schenk 2023-11-19 15:07:14 +01:00
parent b3941d2672
commit 8b294dd1ca

View file

@ -17,8 +17,7 @@ public class CharacterDeletionHandler : IPacketHandler<CharacterDeletePacket>
public async Task HandleAsync(CharacterDeletePacket packet, TcpSession session) public async Task HandleAsync(CharacterDeletePacket packet, TcpSession session)
{ {
using var authSession = session as AuthSession; if (session is not AuthSession authSession)
if (authSession == null)
{ {
session.Disconnect(); session.Disconnect();
return; return;