Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Maple2.Server.Core/Network/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment thread
Zintixx marked this conversation as resolved.
// it's not a real error
return;
}
if (!disposed) {
Logger.Error(ex, "Exception reading recv packet");
}
Expand Down
3 changes: 2 additions & 1 deletion Maple2.Server.Game/PacketHandlers/DungeonRoomHandler.cs
Original file line number Diff line number Diff line change
@@ -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<GameSession> {
public override RecvOp OpCode => RecvOp.RoomDungeon;

private enum Command : byte {
Expand Down