Run server on new thread. (#297)

This commit is contained in:
Kavin 2022-07-02 13:32:20 +01:00 committed by GitHub
parent 943e4a3de8
commit 3a009407ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -42,7 +42,13 @@ public class Main {
}
}, 0, TimeUnit.MINUTES.toMillis(60));
new ServerLauncher().launch(args);
new Thread(() -> {
try {
new ServerLauncher().launch(args);
} catch (Exception e) {
throw new RuntimeException(e);
}
}).start();
if (Constants.DISABLE_TIMERS)
return;