From c7a42e644736f3637a58024b49d7cd65895b7638 Mon Sep 17 00:00:00 2001 From: idk Date: Sun, 21 Aug 2022 11:52:39 -0400 Subject: [PATCH] Don't delay at launch time, delay at run/check time --- java/net/i2p/router/WinLauncher.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java/net/i2p/router/WinLauncher.java b/java/net/i2p/router/WinLauncher.java index 1a78f0d..917b670 100644 --- a/java/net/i2p/router/WinLauncher.java +++ b/java/net/i2p/router/WinLauncher.java @@ -45,7 +45,6 @@ public class WinLauncher { fh.setFormatter(formatter); // the following statement is used to log any messages logger.info("My first log"); - sleep(2000); } catch (SecurityException e) { e.printStackTrace(); } catch (IOException e) { @@ -114,10 +113,15 @@ public class WinLauncher { } 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)) { 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, // exit File home = selectHome();