Author: j16sdiz
Date: 2008-12-29 01:18:40 +0000 (Mon, 29 Dec 2008)
New Revision: 24811

Modified:
   trunk/plugins/XMLSpider/XMLSpider.java
Log:
fix shutdown hook

Modified: trunk/plugins/XMLSpider/XMLSpider.java
===================================================================
--- trunk/plugins/XMLSpider/XMLSpider.java      2008-12-29 01:18:24 UTC (rev 
24810)
+++ trunk/plugins/XMLSpider/XMLSpider.java      2008-12-29 01:18:40 UTC (rev 
24811)
@@ -529,7 +529,11 @@
                Logger.normal(this, "XMLSpider terminating");
 
                synchronized (this) {
-                       Runtime.getRuntime().removeShutdownHook(exitHook);
+                       try {
+                               
Runtime.getRuntime().removeShutdownHook(exitHook);
+                       } catch (IllegalStateException e) {
+                               // shutting down, ignore
+                       }
                        stopped = true;
                        
                        for (Map.Entry<Page, ClientGetter> me : 
runningFetch.entrySet()) {

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to