You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.8 KiB

--- ../src-base/minecraft/net/minecraft/network/rcon/RConThreadClient.java
+++ ../src-work/minecraft/net/minecraft/network/rcon/RConThreadClient.java
10 years ago
@@ -41,20 +41,21 @@
public void run()
{
- while (true)
+ try
10 years ago
{
10 years ago
- try
- {
10 years ago
- if (!this.running)
10 years ago
+ while (true)
+ {
10 years ago
+ if (!this.running || clientSocket == null)
{
break;
}
10 years ago
BufferedInputStream bufferedinputstream = new BufferedInputStream(this.clientSocket.getInputStream());
int i = bufferedinputstream.read(this.buffer, 0, 1460);
10 years ago
-
- if (10 > i)
10 years ago
+
10 years ago
+ if (i < 10)
{
10 years ago
+ this.running = false; // Cauldron
return;
}
@@ -109,27 +110,24 @@
continue;
}
}
+ }
}
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 +165,7 @@
10 years ago
private void closeSocket()
{
+ this.running = false;
if (null != this.clientSocket)
{
try