PaperMC/paper-server/patches/sources/net/minecraft/server/rcon/thread/RconThread.java.patch
Aikar a44dc35353 Remote Connections shouldn't hold up shutdown
Bugs in the connection logic appears to leave stale connections even, preventing shutdown
2020-03-31 03:50:42 -04:00

26 lines
957 B
Diff

--- a/net/minecraft/server/rcon/thread/RconThread.java
+++ b/net/minecraft/server/rcon/thread/RconThread.java
@@ -57,7 +57,7 @@
@Nullable
public static RconThread create(ServerInterface server) {
DedicatedServerProperties dedicatedServerProperties = server.getProperties();
- String string = server.getServerIp();
+ String string = dedicatedServerProperties.rconIp; // Paper - Configurable rcon ip
if (string.isEmpty()) {
string = "0.0.0.0";
}
@@ -104,6 +104,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);