Run server on new thread.

This commit is contained in:
Kavin 2022-07-02 13:30:54 +01:00
parent 943e4a3de8
commit a1a4489282
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -42,7 +42,13 @@ public class Main {
} }
}, 0, TimeUnit.MINUTES.toMillis(60)); }, 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) if (Constants.DISABLE_TIMERS)
return; return;