Don't delay at launch time, delay at run/check time
This commit is contained in:
@@ -45,7 +45,6 @@ public class WinLauncher {
|
|||||||
fh.setFormatter(formatter);
|
fh.setFormatter(formatter);
|
||||||
// the following statement is used to log any messages
|
// the following statement is used to log any messages
|
||||||
logger.info("My first log");
|
logger.info("My first log");
|
||||||
sleep(2000);
|
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -114,10 +113,15 @@ public class WinLauncher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean i2pIsRunning() {
|
private static boolean i2pIsRunning() {
|
||||||
// check if there's something listening on port 7657
|
sleep(2000);
|
||||||
|
// check if there's something listening on port 7657(Router Console)
|
||||||
if (!isAvailable(7657)) {
|
if (!isAvailable(7657)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// check if there's something listening on port 7654(I2CP)
|
||||||
|
if (!isAvailable(7654)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
// check for the existence of router.ping file, if it's less then 2 minutes old,
|
// check for the existence of router.ping file, if it's less then 2 minutes old,
|
||||||
// exit
|
// exit
|
||||||
File home = selectHome();
|
File home = selectHome();
|
||||||
|
|||||||
Reference in New Issue
Block a user