prioritize host check

This commit is contained in:
idk
2022-08-07 21:36:09 -04:00
parent 82b85ca77f
commit cead2e1133

View File

@ -94,6 +94,14 @@ public class WinLauncher {
private static boolean i2pIsRunning() {
// check if there's something listening on port 7657
try {
InetAddress localhost = InetAddress.getLocalHost();
Socket s = new Socket(localhost, 7657);
s.close();
return true;
} catch (IOException e) {
return false;
}
// check for the existence of router.ping file, if it's less then 2 minutes old,
// exit
File home = selectHome();
@ -105,14 +113,6 @@ public class WinLauncher {
return true;
}
}
try {
InetAddress localhost = InetAddress.getLocalHost();
Socket s = new Socket(localhost, 7657);
s.close();
return true;
} catch (IOException e) {
return false;
}
}
private static final Runnable REGISTER_UPP = () -> {