diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index ca7fc968..559103ca 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -545,7 +545,7 @@ private void generateConfigIfNotExists() throws IOException { LogHelper.info("Creating LaunchServer config"); Config newConfig = new Config(); newConfig.mirrors = new String[]{"http://mirror.gravitlauncher.ml/"}; - newConfig.updateMirror = "gravitlauncher.ml:57977"; + newConfig.updateMirror = "gravitlauncher.ml:7245"; newConfig.criticalCallbacks = true; newConfig.launch4j = new ExeConf(); newConfig.launch4j.copyright = "© GravitLauncher Team"; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/UpdateManager.java b/LaunchServer/src/main/java/ru/gravit/launchserver/UpdateManager.java index 2acca0e2f..2a3ba4d3 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/UpdateManager.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/UpdateManager.java @@ -16,7 +16,8 @@ public final class UpdateManager extends TimerTask { private final LaunchServer srv; private final FCL cl; public final Timer t; - private final URL updU; + private final String updUH; + private final int updUP; private int lastNum = 0; public interface Callback { @@ -30,7 +31,9 @@ public interface Callback { this.cl = new FCL(srv); t = new Timer("Updater", true); if (srv.config.criticalCallbacks) t.schedule(this, 60000, 60000); - updU = new URL(srv.config.updateMirror); + String[] updU = lsrv.config.updateMirror.split(":"); + updUH = updU[0]; + updUP = Integer.parseInt(updU[1]); checkVer(); } @@ -77,7 +80,7 @@ public void run() { } private Socket getSocket() throws IOException { - return new Socket(updU.getHost(), updU.getPort()); + return new Socket(updUH, updUP); } private void checkVer() { diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg index cf3fec52..fed060e0 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg @@ -1,5 +1,5 @@ { - "port": 7420, + "port": 7245, "authHandler": { "type": "memory" },