mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Исправлена ошибка некорректного завершения работы
This commit is contained in:
parent
3a69e622ec
commit
50873253b0
2 changed files with 11 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
import ru.gravit.launcher.gui.RuntimeProvider;
|
||||
import ru.gravit.launcher.managers.ClientGsonManager;
|
||||
import ru.gravit.launcher.request.Request;
|
||||
import ru.gravit.launcher.request.websockets.ClientWebSocketService;
|
||||
import ru.gravit.launcher.request.websockets.StandartClientWebSocketService;
|
||||
import ru.gravit.utils.helper.CommonHelper;
|
||||
import ru.gravit.utils.helper.EnvHelper;
|
||||
|
@ -38,6 +39,9 @@ public static void main(String... args) throws Throwable {
|
|||
}
|
||||
long endTime = System.currentTimeMillis();
|
||||
LogHelper.debug("Launcher started in %dms", endTime - startTime);
|
||||
//Request.service.close();
|
||||
//FunctionalBridge.close();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
public static void initGson() {
|
||||
|
|
|
@ -16,11 +16,12 @@
|
|||
import java.nio.file.Path;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class FunctionalBridge {
|
||||
@LauncherAPI
|
||||
public static ScheduledExecutorService threadPool = Executors.newScheduledThreadPool(4);
|
||||
public static ScheduledExecutorService threadPool = Executors.newScheduledThreadPool(0);
|
||||
@LauncherAPI
|
||||
public static OshiHWIDProvider hwidProvider = new OshiHWIDProvider();
|
||||
@LauncherAPI
|
||||
|
@ -84,6 +85,11 @@ public static void registerUserSettings(String typename, Class<? extends UserSet
|
|||
{
|
||||
UserSettings.providers.registerProvider(typename, clazz);
|
||||
}
|
||||
@LauncherAPI
|
||||
public static void close() throws Exception
|
||||
{
|
||||
threadPool.awaitTermination(2, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@LauncherAPI
|
||||
public static void setAuthParams(AuthRequestEvent event) {
|
||||
|
|
Loading…
Reference in a new issue