2015-03-25 05:24:42 +00:00
|
|
|
--- ../src-base/minecraft/net/minecraft/network/rcon/RConThreadClient.java
|
|
|
|
+++ ../src-work/minecraft/net/minecraft/network/rcon/RConThreadClient.java
|
2016-01-31 21:54:40 +00:00
|
|
|
@@ -41,9 +41,9 @@
|
2015-06-01 13:49:05 +00:00
|
|
|
|
|
|
|
public void run()
|
|
|
|
{
|
|
|
|
- while (true)
|
|
|
|
+ try
|
2015-05-14 16:39:15 +00:00
|
|
|
{
|
2015-06-01 13:49:05 +00:00
|
|
|
- try
|
2015-06-01 14:32:10 +00:00
|
|
|
+ while (true)
|
2015-06-03 14:50:46 +00:00
|
|
|
{
|
2016-01-31 21:54:40 +00:00
|
|
|
if (!this.running)
|
2015-05-14 16:39:15 +00:00
|
|
|
{
|
2016-01-31 21:54:40 +00:00
|
|
|
@@ -53,6 +53,12 @@
|
2015-03-25 05:24:42 +00:00
|
|
|
BufferedInputStream bufferedinputstream = new BufferedInputStream(this.clientSocket.getInputStream());
|
|
|
|
int i = bufferedinputstream.read(this.buffer, 0, 1460);
|
2016-01-31 21:54:40 +00:00
|
|
|
|
2015-06-01 13:49:05 +00:00
|
|
|
+ if (i < 10)
|
2016-01-31 21:54:40 +00:00
|
|
|
+ {
|
2015-06-01 14:32:10 +00:00
|
|
|
+ this.running = false; // Cauldron
|
2016-01-31 21:54:40 +00:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
if (10 <= i)
|
|
|
|
{
|
|
|
|
byte b0 = 0;
|
|
|
|
@@ -110,26 +116,23 @@
|
2015-06-01 13:49:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-06-03 14:50:46 +00:00
|
|
|
+ }
|
2015-06-01 13:49:05 +00:00
|
|
|
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
|
2016-01-31 21:54:40 +00:00
|
|
|
@@ -167,6 +170,7 @@
|
2015-05-14 16:39:15 +00:00
|
|
|
|
|
|
|
private void closeSocket()
|
|
|
|
{
|
2015-06-01 14:32:10 +00:00
|
|
|
+ this.running = false;
|
2015-05-14 16:39:15 +00:00
|
|
|
if (null != this.clientSocket)
|
|
|
|
{
|
|
|
|
try
|