Fixed Stopped messange on start.

This commit is contained in:
zaxar163 2018-12-26 15:44:35 +03:00
parent 1a562792cf
commit ddeefc03b0
4 changed files with 4 additions and 9 deletions

View file

@ -77,7 +77,7 @@
import ru.gravit.utils.helper.SecurityHelper; import ru.gravit.utils.helper.SecurityHelper;
import ru.gravit.utils.helper.VerifyHelper; 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 static final class Config {
public int port; public int port;
@ -236,9 +236,7 @@ public static void main(String... args) throws Throwable {
// Start LaunchServer // Start LaunchServer
Instant start = Instant.now(); Instant start = Instant.now();
try { try {
try (LaunchServer lsrv = new LaunchServer(IOHelper.WORKING_DIR)) { new LaunchServer(IOHelper.WORKING_DIR).run();
lsrv.run();
}
} catch (Throwable exc) { } catch (Throwable exc) {
LogHelper.error(exc); LogHelper.error(exc);
return; return;
@ -469,7 +467,6 @@ public void buildLauncherBinaries() throws IOException {
launcherEXEBinary.build(); launcherEXEBinary.build();
} }
@Override
public void close() { public void close() {
serverSocketHandler.close(); serverSocketHandler.close();

View file

@ -9,7 +9,6 @@
import ru.gravit.launcher.request.update.LegacyLauncherRequest.Result; import ru.gravit.launcher.request.update.LegacyLauncherRequest.Result;
import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.JVMHelper; import ru.gravit.utils.helper.JVMHelper;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -8,7 +8,6 @@
import ru.gravit.launcher.request.RequestType; import ru.gravit.launcher.request.RequestType;
import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

View file

@ -56,8 +56,8 @@ public static void premain(String agentArgument, Instrumentation instrumentation
if (IOHelper.exists(libraries)) loadLibraries(libraries); if (IOHelper.exists(libraries)) loadLibraries(libraries);
} }
if (isAgentProxy) { if (isAgentProxy) {
String proxyClassName = System.getProperty("serverwrapper,agentproxyclass"); String proxyClassName = System.getProperty("serverwrapper.agentproxyclass");
Class proxyClass; Class<?> proxyClass;
try { try {
proxyClass = Class.forName(proxyClassName); proxyClass = Class.forName(proxyClassName);
MethodHandle mainMethod = MethodHandles.publicLookup().findStatic(proxyClass, "premain", MethodType.methodType(void.class, String.class, Instrumentation.class)); MethodHandle mainMethod = MethodHandles.publicLookup().findStatic(proxyClass, "premain", MethodType.methodType(void.class, String.class, Instrumentation.class));