diff --git a/java/net/i2p/router/WinLauncher.java b/java/net/i2p/router/WinLauncher.java index 5342356..71321ed 100644 --- a/java/net/i2p/router/WinLauncher.java +++ b/java/net/i2p/router/WinLauncher.java @@ -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 = () -> {