r26727 - trunk/freenet/src/freenet/client/async

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: toad
Date: 2009-04-10 22:35:37 +0000 (Fri, 10 Apr 2009)
New Revision: 26727

Modified:
   trunk/freenet/src/freenet/client/async/PersistentCooldownQueue.java
Log:
Delete the cloned key in any case. Ignore a cooldown item if the client has been removed.


Modified: trunk/freenet/src/freenet/client/async/PersistentCooldownQueue.java
===================================================================
--- trunk/freenet/src/freenet/client/async/PersistentCooldownQueue.java	2009-04-10 20:25:57 UTC (rev 26726)
+++ trunk/freenet/src/freenet/client/async/PersistentCooldownQueue.java	2009-04-10 22:35:37 UTC (rev 26727)
@@ -123,7 +123,12 @@
 					continue;
 				}
 				container.activate(i.key, 5);
-				v.add(i.key.cloneKey());
+				if(i.client == null || !container.ext().isStored(i.client)) {
+					Logger.normal(this, "Client has been removed but not the persistent cooldown queue item: time "+i.time+" for key "+i.key);
+				} else {
+					v.add(i.key.cloneKey());
+				}
+				i.key.removeFrom(container);
 				i.delete(container);
 			}
 			if(!v.isEmpty()) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.