diff --git a/i2p.plugins.firefox.torrent b/i2p.plugins.firefox.torrent index 26737e6..ee57a40 100644 Binary files a/i2p.plugins.firefox.torrent and b/i2p.plugins.firefox.torrent differ diff --git a/scripts/build.number b/scripts/build.number index ad3dfef..f54a591 100644 --- a/scripts/build.number +++ b/scripts/build.number @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Thu Dec 22 03:53:58 UTC 2022 -build.number=349 +#Thu Dec 22 03:55:07 UTC 2022 +build.number=350 diff --git a/src/java/net/i2p/i2pfirefox/I2PBrowserPlugin.java b/src/java/net/i2p/i2pfirefox/I2PBrowserPlugin.java index 9f066e7..d210b4d 100644 --- a/src/java/net/i2p/i2pfirefox/I2PBrowserPlugin.java +++ b/src/java/net/i2p/i2pfirefox/I2PBrowserPlugin.java @@ -27,28 +27,35 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp { shutdown = true; this.shutdownSystray(); } - public void startup() { - try { + private void downloadInBackground() { + got = downloadTorrent(); + while (!got) { + logger.info("Working to download updates in the background"); + if (shutdown) { + break; + } got = downloadTorrent(); - while (!got) { - logger.info("Working to download updates in the background"); - if (shutdown) { - break; - } - got = downloadTorrent(); - Thread.sleep(5000); - } - if (got) { - File content = torrentFileContents(); - if (content.exists()) { - content.delete(); - } + Thread.sleep(5000); + } + if (got) { + File content = torrentFileContents(); + if (content.exists()) { + content.delete(); } + } + } + public void startup() { + Runnable r = new Runnable() { + public void run() { downloadInBackground(); } + }; + new Thread(r).start(); + try { this.startup(args); } catch (Exception e) { logger.info(e.toString()); } } + private File torrentDir() throws IOException { File configDir = context.getConfigDir(); if (configDir == null) {