PaperMC/paper-server/patches/sources/net/minecraft/server/rcon/thread/RconThread.java.patch
2024-12-14 18:40:23 -08:00

26 lines
959 B
Diff

--- a/net/minecraft/server/rcon/thread/RconThread.java
+++ b/net/minecraft/server/rcon/thread/RconThread.java
@@ -57,7 +_,7 @@
@Nullable
public static RconThread create(ServerInterface serverInterface) {
DedicatedServerProperties properties = serverInterface.getProperties();
- String serverIp = serverInterface.getServerIp();
+ String serverIp = properties.rconIp; // Paper - Configurable rcon ip
if (serverIp.isEmpty()) {
serverIp = "0.0.0.0";
}
@@ -104,6 +_,14 @@
this.clients.clear();
}
+ // Paper start - don't wait for remote connections
+ public void stopNonBlocking() {
+ this.running = false;
+ for (RconClient client : this.clients) {
+ client.running = false;
+ }
+ }
+ // Paper end - don't wait for remote connections
private void closeSocket(ServerSocket socket) {
LOGGER.debug("closeSocket: {}", socket);