r26709 - trunk/freenet/src/freenet/client/async

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

Modified:
   trunk/freenet/src/freenet/client/async/PersistentCooldownQueue.java
Log:
Clone key, call delete() on PCQItem


Modified: trunk/freenet/src/freenet/client/async/PersistentCooldownQueue.java
===================================================================
--- trunk/freenet/src/freenet/client/async/PersistentCooldownQueue.java	2009-04-10 13:39:00 UTC (rev 26708)
+++ trunk/freenet/src/freenet/client/async/PersistentCooldownQueue.java	2009-04-10 14:10:01 UTC (rev 26709)
@@ -35,7 +35,7 @@
 	public long add(Key key, SendableGet client, ObjectContainer container) {
 		assert(cooldownTime != 0);
 		long removeTime = System.currentTimeMillis() + cooldownTime;
-		PersistentCooldownQueueItem persistentCooldownQueueItem = new PersistentCooldownQueueItem(client, key, removeTime, this);
+		PersistentCooldownQueueItem persistentCooldownQueueItem = new PersistentCooldownQueueItem(client, key.cloneKey(), removeTime, this);
 		container.store(persistentCooldownQueueItem);
 		return removeTime;
 	}
@@ -121,8 +121,8 @@
 					Logger.error(this, "parent="+i.parent+" but should be "+this);
 					continue;
 				}
-				container.delete(i);
-				v.add(i.key);
+				v.add(i.key.cloneKey());
+				i.delete(container);
 			}
 			if(!v.isEmpty()) {
 				return v.toArray(new Key[v.size()]);
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.