From 7d66dc54c4f41fbb39ac405d5cddc335e0b30a02 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 3 Jul 2020 09:23:33 +1000 Subject: [PATCH] SPIGOT-5867, MC-193339: NPE during shutdown when rcon enabled with no password By: md_5 --- paper-server/nms-patches/RemoteControlListener.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 paper-server/nms-patches/RemoteControlListener.patch diff --git a/paper-server/nms-patches/RemoteControlListener.patch b/paper-server/nms-patches/RemoteControlListener.patch new file mode 100644 index 0000000000..03a7df4020 --- /dev/null +++ b/paper-server/nms-patches/RemoteControlListener.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/RemoteControlListener.java ++++ b/net/minecraft/server/RemoteControlListener.java +@@ -109,7 +109,7 @@ + RemoteControlListener.LOGGER.debug("closeSocket: {}", serversocket); + + try { +- serversocket.close(); ++ if (serversocket != null) serversocket.close(); // CraftBukkit - SPIGOT-5867, MC-193339: NPE during shutdown if no password + } catch (IOException ioexception) { + RemoteControlListener.LOGGER.warn("Failed to close socket", ioexception); + }