Author: toad
Date: 2007-02-14 01:08:09 +0000 (Wed, 14 Feb 2007)
New Revision: 11780
Modified:
trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
Log:
Fix #1058.
Modified: trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
===================================================================
--- trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2007-02-14
00:38:40 UTC (rev 11779)
+++ trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2007-02-14
01:08:09 UTC (rev 11780)
@@ -57,9 +57,19 @@
"to any other freenet node.",
UserAlert.WARNING);
}
+ /** Start the detector plugin manager. This includes running the
plugin, if there
+ * is one, and if it is necessary to do so. */
void start() {
// Cannot be initialized until UserAlertManager has been
created.
proxyAlert = new ProxyUserAlert(node.clientCore.alerts);
+ tryMaybeRun();
+ }
+
+ /**
+ * Start the plugin detection, if necessary. Either way, schedule
another attempt in
+ * 1 minute's time.
+ */
+ private void tryMaybeRun() {
try {
maybeRun();
} catch (Throwable t) {
@@ -67,12 +77,11 @@
}
ticker.queueTimedJob(new Runnable() {
public void run() {
- start();
+ tryMaybeRun();
}
}, 60*1000);
-
}
-
+
/**
* Register a plugin.
*/