Author: toad
Date: 2007-09-08 17:12:48 +0000 (Sat, 08 Sep 2007)
New Revision: 15058

Modified:
   trunk/freenet/src/freenet/pluginmanager/PluginHandler.java
Log:
Fix regression: Don't unregister on runPlugin() exit unless it's a threaded 
plugin!

Modified: trunk/freenet/src/freenet/pluginmanager/PluginHandler.java
===================================================================
--- trunk/freenet/src/freenet/pluginmanager/PluginHandler.java  2007-09-08 
17:07:47 UTC (rev 15057)
+++ trunk/freenet/src/freenet/pluginmanager/PluginHandler.java  2007-09-08 
17:12:48 UTC (rev 15058)
@@ -81,9 +81,10 @@
                                        System.err.println("Caught Throwable 
while running plugin: "+t);
                                        t.printStackTrace();
                                }
-                               pi.unregister(pm); // If not already 
unregistered
-                               if(!(plugin instanceof FredPluginThreadless))
+                               if(!(plugin instanceof FredPluginThreadless)) {
+                                       pi.unregister(pm); // If not already 
unregistered
                                        pm.removePlugin(pi);
+                               }
                        } else {
                                // If not FredPlugin, then the whole thing is 
aborted,
                                // and then this method will return, killing 
the thread


Reply via email to