diff --git a/Maple2.Server.Core/Network/Session.cs b/Maple2.Server.Core/Network/Session.cs index 53df37c9b..a3fe226a4 100644 --- a/Maple2.Server.Core/Network/Session.cs +++ b/Maple2.Server.Core/Network/Session.cs @@ -211,6 +211,11 @@ private async Task ReadRecvPipe(PipeReader reader) { reader.AdvanceTo(buffer.Start, buffer.End); } while (!disposed && !result.IsCompleted); } catch (Exception ex) { + if (ex is InvalidOperationException invalidOperation && invalidOperation.Message.Contains("reader was completed")) { + // Ignore this exception, it happens when the reader is completed, either by the client closing or by the session being disposed. + // it's not a real error + return; + } if (!disposed) { Logger.Error(ex, "Exception reading recv packet"); } diff --git a/Maple2.Server.Game/PacketHandlers/DungeonRoomHandler.cs b/Maple2.Server.Game/PacketHandlers/DungeonRoomHandler.cs index 055181a33..327993f78 100644 --- a/Maple2.Server.Game/PacketHandlers/DungeonRoomHandler.cs +++ b/Maple2.Server.Game/PacketHandlers/DungeonRoomHandler.cs @@ -1,12 +1,13 @@ using Maple2.Database.Storage; using Maple2.PacketLib.Tools; using Maple2.Server.Core.Constants; +using Maple2.Server.Core.PacketHandlers; using Maple2.Server.Game.PacketHandlers.Field; using Maple2.Server.Game.Session; namespace Maple2.Server.Game.PacketHandlers; -public class DungeonRoomHandler : FieldPacketHandler { +public class DungeonRoomHandler : PacketHandler { public override RecvOp OpCode => RecvOp.RoomDungeon; private enum Command : byte {