diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java index 57a23d37..046ebf9c 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java @@ -299,7 +299,12 @@ private static void launch(ClientProfile profile, Params params) throws Throwabl Launcher.LAUNCHED.set(true); JVMHelper.fullGC(); // Invoke main method - mainMethod.invokeWithArguments((Object) args.toArray(new String[0])); + try { + mainMethod.invokeWithArguments((Object) args.toArray(new String[0])); + } finally { + Request.service.close(); + } + } private static Process process = null; @@ -501,7 +506,7 @@ public static void main(String... args) throws Throwable { ClientService.classLoader = classLoader; classLoader.addURL(IOHelper.getCodeSource(ClientLauncher.class).toUri().toURL()); //classForName(classLoader, "com.google.common.collect.ForwardingMultimap"); - ClientService.baseURLs = classpath; + ClientService.baseURLs = classLoader.getURLs(); LogHelper.debug("Starting JVM and client WatchService"); FileNameMatcher assetMatcher = profile.getAssetUpdateMatcher(); FileNameMatcher clientMatcher = profile.getClientUpdateMatcher(); diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java index 488cf589..3249510b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java @@ -108,7 +108,7 @@ public void close() throws InterruptedException { ch.closeFuture().sync(); } - //group.shutdownGracefully(); + group.shutdownGracefully(); } public void eval(final String text) {