Author: toad
Date: 2009-04-03 14:18:45 +0000 (Fri, 03 Apr 2009)
New Revision: 26440

Modified:
   trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java
Log:
Avoid leak, tell block it's dumped when we decide not to use it because the key 
is already being fetched.


Modified: trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java
===================================================================
--- trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java 
2009-04-03 14:10:53 UTC (rev 26439)
+++ trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java 
2009-04-03 14:18:45 UTC (rev 26440)
@@ -82,8 +82,10 @@
                }
                for(PersistentChosenBlock block : candidates) {
                        Key key = block.key;
-                       if(key != null && sched.hasFetchingKey(key))
+                       if(key != null && sched.hasFetchingKey(key)) {
+                               block.onDumped();
                                continue;
+                       }
                        blocksNotStarted.add(block);
                }
                sender = req.getSender(container, context);

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

Reply via email to