mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Prevent the rcon thread from attempting connections after shutdown
This commit is contained in:
parent
b3a92319b9
commit
e6be773522
2 changed files with 22 additions and 3 deletions
|
@ -251,7 +251,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this);
|
((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this);
|
||||||
}
|
}
|
||||||
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
//this.remoteStatusListener.b(); // Paper - don't wait for remote connections
|
// this.remoteStatusListener.stop(); // Paper - don't wait for remote connections
|
||||||
}
|
}
|
||||||
|
|
||||||
- System.exit(0); // CraftBukkit
|
- System.exit(0); // CraftBukkit
|
||||||
|
|
|
@ -14,12 +14,31 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
|
|
||||||
if (this.rconThread != null) {
|
if (this.rconThread != null) {
|
||||||
- this.rconThread.stop();
|
- this.rconThread.stop();
|
||||||
+ //this.remoteControlListener.b(); // Paper - don't wait for remote connections
|
+ this.rconThread.stopNonBlocking(); // Paper - don't wait for remote connections
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.queryThreadGs4 != null) {
|
if (this.queryThreadGs4 != null) {
|
||||||
- this.queryThreadGs4.stop();
|
- this.queryThreadGs4.stop();
|
||||||
+ //this.remoteStatusListener.b(); // Paper - don't wait for remote connections
|
+ // this.remoteStatusListener.stop(); // Paper - don't wait for remote connections
|
||||||
}
|
}
|
||||||
|
|
||||||
System.exit(0); // CraftBukkit
|
System.exit(0); // CraftBukkit
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
|
||||||
|
@@ -0,0 +0,0 @@ public class RconThread extends GenericThread {
|
||||||
|
|
||||||
|
this.clients.clear();
|
||||||
|
}
|
||||||
|
+ // Paper start
|
||||||
|
+ public void stopNonBlocking() {
|
||||||
|
+ this.running = false;
|
||||||
|
+ for (RconClient client : this.clients) {
|
||||||
|
+ client.running = false;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ // Paper stop
|
||||||
|
|
||||||
|
private void closeSocket(ServerSocket socket) {
|
||||||
|
LOGGER.debug("closeSocket: {}", (Object)socket);
|
||||||
|
|
Loading…
Reference in a new issue