From f7feec029e28c0c67344c874b4e136e296b3e05c Mon Sep 17 00:00:00 2001 From: cpw Date: Sun, 12 Jun 2016 12:15:10 -0400 Subject: [PATCH] Mute the connection reset by peer exception - it's spamilicious for the most part. --- .../common/network/handshake/NetworkDispatcher.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java b/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java index 78209451b..ea419a24f 100644 --- a/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java +++ b/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java @@ -562,7 +562,15 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler> im // Stop the epic channel closed spam at close if (!(cause instanceof ClosedChannelException)) { - FMLLog.log(Level.ERROR, cause, "NetworkDispatcher exception"); + // Mute the reset by peer exception - it's disconnection noise + if (cause.getMessage().contains("Connection reset by peer")) + { + FMLLog.log(Level.DEBUG, cause, "Muted NetworkDispatcher exception"); + } + else + { + FMLLog.log(Level.ERROR, cause, "NetworkDispatcher exception"); + } } super.exceptionCaught(ctx, cause); }