Compare commits

..

3 commits

Author SHA1 Message Date
Antoni
dfe65af7ea
Merge 0e1691ee4c into 912caa6b8a 2024-11-05 09:15:56 +03:00
Gravita
912caa6b8a
[FIX] Add more logging to timestamp failed error 2024-11-05 08:52:59 +07:00
Gravita
926094076c
[FIX] Fix NPE with nativePath PR #719 2024-11-05 07:08:31 +07:00
3 changed files with 7 additions and 1 deletions

View file

@ -88,7 +88,7 @@ private static void realMain(String[] args) throws Throwable {
ClientParams params = readParams(new InetSocketAddress("127.0.0.1", Launcher.getConfig().clientPort));
ClientLauncherMethods.verifyNoAgent();
if(params.timestamp > System.currentTimeMillis() || params.timestamp + 30*1000 < System.currentTimeMillis() ) {
LogHelper.error("Timestamp failed. Exit");
LogHelper.error("Timestamp failed: current %d | params %d | diff %d", System.currentTimeMillis(), params.timestamp, System.currentTimeMillis() - params.timestamp);
ClientLauncherMethods.exitLauncher(-662);
return;
}

View file

@ -123,6 +123,9 @@ protected Class<?> findClass(String name) throws ClassNotFoundException {
@Override
public String findLibrary(String name) {
if(nativePath == null) {
return null;
}
return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION);
}

View file

@ -262,6 +262,9 @@ protected Class<?> findClass(String moduleName, String name) {
@Override
public String findLibrary(String name) {
if(nativePath == null) {
return null;
}
return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION);
}