enable faster startups
This commit is contained in:
@@ -143,8 +143,7 @@ public class WinLauncher {
|
||||
return portFree;
|
||||
}
|
||||
|
||||
private static boolean i2pIsRunning() {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
private static boolean i2pIsRunningCheck() {
|
||||
// check if there's something listening on port 7657(Router Console)
|
||||
if (!isAvailable(7657)) {
|
||||
return true;
|
||||
@@ -166,6 +165,15 @@ public class WinLauncher {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean i2pIsRunning() {
|
||||
if (i2pIsRunningCheck())
|
||||
return true;
|
||||
for (int i = 0; i < 20; i++) {
|
||||
if (i2pIsRunningCheck())
|
||||
return true;
|
||||
sleep(1000);
|
||||
}
|
||||
return false;
|
||||
@@ -223,13 +231,13 @@ public class WinLauncher {
|
||||
File local = new File(appData, "Local");
|
||||
File i2p;
|
||||
i2p = new File(local, "I2P");
|
||||
logger.info("Windows jpackage wrapper started, using: " + i2p +
|
||||
logger.info("Windows jpackage wrapper starting up, using: " + i2p +
|
||||
" as base config");
|
||||
return i2p.getAbsoluteFile();
|
||||
} else {
|
||||
File jrehome = new File(System.getProperty("java.home"));
|
||||
File programs = new File(jrehome.getParentFile().getParentFile(), ".i2p");
|
||||
logger.info("Linux portable jpackage wrapper started, using: " +
|
||||
logger.info("Linux portable jpackage wrapper starting up, using: " +
|
||||
programs + " as base config");
|
||||
return programs.getAbsoluteFile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user