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 8727ca82..607cca82 100644 --- a/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerAgent.java +++ b/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerAgent.java @@ -63,16 +63,16 @@ public static void premain(String agentArgument, Instrumentation instrumentation Object[] args = {agentArgument, instrumentation}; mainMethod.invoke(args); } catch (Throwable e) { - e.printStackTrace(); + LogHelper.error(e); } } } public static void loadLibraries(Path dir) { try { - Files.walkFileTree(dir, Collections.singleton(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new StarterVisitor()); + IOHelper.walk(dir, new StarterVisitor(), true); } catch (IOException e) { - e.printStackTrace(System.err); + LogHelper.error(e); } } } diff --git a/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerWrapper.java index d46e36cf..8ee17b3d 100644 --- a/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerWrapper.java @@ -77,6 +77,8 @@ public static boolean loopAuth(ServerWrapper wrapper, int count, int sleeptime) try { Thread.sleep(sleeptime); } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + LogHelper.error(e); return false; } } @@ -179,10 +181,6 @@ private static void generateConfigIfNotExists() throws IOException { newConfig.reconnectCount = 10; newConfig.reconnectSleep = 1000; newConfig.env = LauncherConfig.LauncherEnvironment.STD; - //try(Reader reader = IOHelper.newReader(IOHelper.getResourceURL("ru/gravit/launcher/server/ServerWrapper.cfg"))) - //{ - // newConfig = gson.fromJson(reader,Config.class); - //} LogHelper.warning("Title is not set. Please show ServerWrapper.cfg");