From f4bcd6da82d703a7824fe54bf855d898a0e278f9 Mon Sep 17 00:00:00 2001 From: Prototik Date: Thu, 14 May 2015 23:39:15 +0700 Subject: [PATCH] Fix RCON --- build.gradle | 2 +- .../network/rcon/RConThreadClient.java.patch | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 01c880d..4a4f0fd 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ archivesBaseName = 'kcauldron' ext.mcVersion = "1.7.10" ext.cauldronVersion = "3" ext.forgeVersion = "1403" -ext.revision = "60" +ext.revision = "61" version = "${mcVersion}-${cauldronVersion}.${forgeVersion}.${revision}" launch4j { diff --git a/patches/net/minecraft/network/rcon/RConThreadClient.java.patch b/patches/net/minecraft/network/rcon/RConThreadClient.java.patch index 40bc342..39f3ee4 100644 --- a/patches/net/minecraft/network/rcon/RConThreadClient.java.patch +++ b/patches/net/minecraft/network/rcon/RConThreadClient.java.patch @@ -1,6 +1,14 @@ --- ../src-base/minecraft/net/minecraft/network/rcon/RConThreadClient.java +++ ../src-work/minecraft/net/minecraft/network/rcon/RConThreadClient.java -@@ -52,6 +52,8 @@ +@@ -45,13 +45,15 @@ + { + try + { +- if (!this.running) ++ if (!this.running || clientSocket == null) + { + break; + } BufferedInputStream bufferedinputstream = new BufferedInputStream(this.clientSocket.getInputStream()); int i = bufferedinputstream.read(this.buffer, 0, 1460); @@ -9,3 +17,11 @@ if (10 > i) { +@@ -167,6 +169,7 @@ + + private void closeSocket() + { ++ this.running = false; + if (null != this.clientSocket) + { + try