3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Fix server not stopping when eula not agreed yet

Dieser Commit ist enthalten in:
Aikar 2020-07-01 03:32:26 -04:00
Ursprung 6f30ecdeb9
Commit 4fd0d54ee7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE

Datei anzeigen

@ -25,10 +25,10 @@ index b13d8ec9aa0a51d5432129f1b0ecef3beb5b7276..f4c93a65c28eeca4a07aaf9b00507d5c
}
diff --git a/src/main/java/net/minecraft/server/ServerWorkerThread.java b/src/main/java/net/minecraft/server/ServerWorkerThread.java
new file mode 100644
index 0000000000000000000000000000000000000000..59cfb76d737f923c7e424743ef370c969ae14c26
index 0000000000000000000000000000000000000000..1a94648cb79c8f2889aacb5fb21dc07ad84a4a6b
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ServerWorkerThread.java
@@ -0,0 +1,24 @@
@@ -0,0 +1,25 @@
+package net.minecraft.server;
+
+import java.util.concurrent.CompletionException;
@ -40,6 +40,7 @@ index 0000000000000000000000000000000000000000..59cfb76d737f923c7e424743ef370c96
+ super(target, "Server-Worker-" + threadId.getAndIncrement());
+ setPriority(Thread.NORM_PRIORITY-1); // Deprioritize over main
+ this.setUncaughtExceptionHandler((thread, throwable) -> {
+ thread.setDaemon(true);
+ if (throwable instanceof CompletionException) {
+ throwable = throwable.getCause();
+ }