check for up to a whole 20 seconds to see if a router is running instead of just 2

This commit is contained in:
idk
2022-09-04 14:45:10 -04:00
parent 262311390e
commit 5cf5d56738

View File

@@ -144,6 +144,7 @@ public class WinLauncher {
}
private static boolean i2pIsRunning() {
for (int i = 0; i > 10; i++) {
sleep(2000);
// check if there's something listening on port 7657(Router Console)
if (!isAvailable(7657)) {
@@ -153,8 +154,8 @@ public class WinLauncher {
if (!isAvailable(7654)) {
return true;
}
// check for the existence of router.ping file, if it's less then 2 minutes
// old, exit
// check for the existence of router.ping file, if it's less then 2
// minutes old, exit
File home = selectHome();
File ping = new File(home, "router.ping");
if (ping.exists()) {
@@ -166,6 +167,7 @@ public class WinLauncher {
return true;
}
}
}
return false;
}