diff --git a/patches/server/Cache-user-authenticator-threads.patch b/patches/server/Cache-user-authenticator-threads.patch index 86dd669002..5c61f9f858 100644 --- a/patches/server/Cache-user-authenticator-threads.patch +++ b/patches/server/Cache-user-authenticator-threads.patch @@ -12,18 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } -+ // Paper start - Cache authenticator threads -+ private static final AtomicInteger threadId = new AtomicInteger(0); -+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool( -+ r -> { -+ Thread ret = new Thread(r, "User Authenticator #" + threadId.incrementAndGet()); ++ private static final java.util.concurrent.ExecutorService authenticatorPool = new java.util.concurrent.ThreadPoolExecutor(0, 16, 60L, java.util.concurrent.TimeUnit.SECONDS, new java.util.concurrent.SynchronousQueue<>(), new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads + -+ ret.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)); -+ -+ return ret; -+ } -+ ); -+ // Paper end // Spigot start public void initUUID() {