3
0
KCauldronX/patches/net/minecraft/network/rcon/RConThreadClient.java.patch
Sergey Shatunov 0dd6c7efdf Jline's ConsoleReader reads empty string instead of null in stdin-less
environment, like exec() from many languages. Add empty check.
2016-02-09 21:19:36 +07:00

53 lines
1.3 KiB
Diff

--- ../src-base/minecraft/net/minecraft/network/rcon/RConThreadClient.java
+++ ../src-work/minecraft/net/minecraft/network/rcon/RConThreadClient.java
@@ -41,9 +41,9 @@
public void run()
{
- while (true)
+ try
{
- try
+ while (true)
{
if (!this.running)
{
@@ -110,26 +110,23 @@
}
}
}
+ }
catch (SocketTimeoutException sockettimeoutexception)
{
- break;
+ return;
}
catch (IOException ioexception)
{
- break;
+ return;
}
catch (Exception exception1)
{
field_164005_h.error("Exception whilst parsing RCON input", exception1);
- break;
}
finally
{
this.closeSocket();
}
-
- return;
- }
}
private void sendResponse(int p_72654_1_, int p_72654_2_, String p_72654_3_) throws IOException
@@ -167,6 +164,7 @@
private void closeSocket()
{
+ this.running = false;
if (null != this.clientSocket)
{
try