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