From 7d256d659fa4f4ced0f8b33bd387682c0aef5f62 Mon Sep 17 00:00:00 2001 From: HeartPattern Date: Sat, 13 Jun 2020 02:21:29 +0900 Subject: [PATCH] Remove useless warn logging while disconnecting Remove useless "handleDisconnection() called twice" logging. This warning log every time player kicked by server. --- ...-Network-Manager-and-add-advanced-packet-sup.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/0346-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0346-Optimize-Network-Manager-and-add-advanced-packet-sup.patch index 7e75dd6478..3194886087 100644 --- a/Spigot-Server-Patches/0346-Optimize-Network-Manager-and-add-advanced-packet-sup.patch +++ b/Spigot-Server-Patches/0346-Optimize-Network-Manager-and-add-advanced-packet-sup.patch @@ -28,7 +28,7 @@ and then catch exceptions and close if they fire. Part of this commit was authored by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index b1dededc15cce686ead74a99bee64c89ac1de22c..289b17addd71aeab8a392e8f6a53d4c6329cf562 100644 +index b1dededc15cce686ead74a99bee64c89ac1de22c..32886109d03f9991446381160d5406056d2bf860 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -64,6 +64,10 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -287,6 +287,15 @@ index b1dededc15cce686ead74a99bee64c89ac1de22c..289b17addd71aeab8a392e8f6a53d4c6 // Spigot End if (this.channel.isOpen()) { this.channel.close(); // We can't wait as this may be called from an event loop. +@@ -327,7 +472,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { + public void handleDisconnection() { + if (this.channel != null && !this.channel.isOpen()) { + if (this.o) { +- NetworkManager.LOGGER.warn("handleDisconnection() called twice"); ++ //NetworkManager.LOGGER.warn("handleDisconnection() called twice"); // Paper - Do not log useless message + } else { + this.o = true; + if (this.j() != null) { @@ -335,7 +480,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } else if (this.i() != null) { this.i().a(new ChatMessage("multiplayer.disconnect.generic", new Object[0]));