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()]);

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

Reply via email to