From ddeefc03b0528c025899b80aa5d95555af095168 Mon Sep 17 00:00:00 2001 From: zaxar163 Date: Wed, 26 Dec 2018 15:44:35 +0300 Subject: [PATCH] Fixed Stopped messange on start. --- .../src/main/java/ru/gravit/launchserver/LaunchServer.java | 7 ++----- .../launcher/request/update/LegacyLauncherRequest.java | 1 - .../ru/gravit/launcher/request/update/ProfilesRequest.java | 1 - .../main/java/ru/gravit/launcher/server/ServerAgent.java | 4 ++-- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 5922dcb7..a1efd0bf 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -77,7 +77,7 @@ import ru.gravit.utils.helper.SecurityHelper; import ru.gravit.utils.helper.VerifyHelper; -public final class LaunchServer implements Runnable, AutoCloseable { +public final class LaunchServer implements Runnable { public static final class Config { public int port; @@ -236,9 +236,7 @@ public static void main(String... args) throws Throwable { // Start LaunchServer Instant start = Instant.now(); try { - try (LaunchServer lsrv = new LaunchServer(IOHelper.WORKING_DIR)) { - lsrv.run(); - } + new LaunchServer(IOHelper.WORKING_DIR).run(); } catch (Throwable exc) { LogHelper.error(exc); return; @@ -469,7 +467,6 @@ public void buildLauncherBinaries() throws IOException { launcherEXEBinary.build(); } - @Override public void close() { serverSocketHandler.close(); diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LegacyLauncherRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LegacyLauncherRequest.java index 49a6e5ff..0c5ec83b 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LegacyLauncherRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LegacyLauncherRequest.java @@ -9,7 +9,6 @@ import ru.gravit.launcher.request.update.LegacyLauncherRequest.Result; import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; -import ru.gravit.launcher.serialize.signed.SignedObjectHolder; import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.JVMHelper; import ru.gravit.utils.helper.LogHelper; diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/ProfilesRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/ProfilesRequest.java index 32c675e0..111cfd13 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/ProfilesRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/ProfilesRequest.java @@ -8,7 +8,6 @@ import ru.gravit.launcher.request.RequestType; import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; -import ru.gravit.launcher.serialize.signed.SignedObjectHolder; import java.util.ArrayList; import java.util.Collections; diff --git a/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerAgent.java b/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerAgent.java index d7ef0a19..2acd9202 100644 --- a/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerAgent.java +++ b/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerAgent.java @@ -56,8 +56,8 @@ public static void premain(String agentArgument, Instrumentation instrumentation if (IOHelper.exists(libraries)) loadLibraries(libraries); } if (isAgentProxy) { - String proxyClassName = System.getProperty("serverwrapper,agentproxyclass"); - Class proxyClass; + String proxyClassName = System.getProperty("serverwrapper.agentproxyclass"); + Class proxyClass; try { proxyClass = Class.forName(proxyClassName); MethodHandle mainMethod = MethodHandles.publicLookup().findStatic(proxyClass, "premain", MethodType.methodType(void.class, String.class, Instrumentation.class));