mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
Fix shutdown on eula not being agreed (Fixes #4647)
This commit is contained in:
parent
c43dcbfcf0
commit
8522e7b274
1 changed files with 3 additions and 2 deletions
|
@ -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..1a94648cb79c8f2889aacb5fb21dc07ad84a4a6b
|
||||
index 0000000000000000000000000000000000000000..703f45da2954272a7b92e2b11087c80a11f0370d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/ServerWorkerThread.java
|
||||
@@ -0,0 +1,25 @@
|
||||
@@ -0,0 +1,26 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.util.concurrent.CompletionException;
|
||||
|
@ -39,6 +39,7 @@ index 0000000000000000000000000000000000000000..1a94648cb79c8f2889aacb5fb21dc07a
|
|||
+ public ServerWorkerThread(Runnable target) {
|
||||
+ super(target, "Server-Worker-" + threadId.getAndIncrement());
|
||||
+ setPriority(Thread.NORM_PRIORITY-1); // Deprioritize over main
|
||||
+ this.setDaemon(true);
|
||||
+ this.setUncaughtExceptionHandler((thread, throwable) -> {
|
||||
+ thread.setDaemon(true);
|
||||
+ if (throwable instanceof CompletionException) {
|
||||
|
|
Loading…
Reference in a new issue