Author: toad
Date: 2008-01-18 12:24:43 +0000 (Fri, 18 Jan 2008)
New Revision: 17127

Modified:
   trunk/freenet/src/freenet/client/async/SingleBlockInserter.java
Log:
Don't kill the request if it's already finished.

Modified: trunk/freenet/src/freenet/client/async/SingleBlockInserter.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SingleBlockInserter.java     
2008-01-18 12:16:38 UTC (rev 17126)
+++ trunk/freenet/src/freenet/client/async/SingleBlockInserter.java     
2008-01-18 12:24:43 UTC (rev 17127)
@@ -291,6 +291,12 @@
                        if(b != null)
                                core.realPut(b, ctx.cacheLocalRequests);
                        else {
+                               synchronized(this) {
+                                       if(finished) {
+                                               Logger.error(this, "Trying to 
run send "+this+" when already finished", new Exception("error"));
+                                               return false;
+                                       }
+                               }
                                if(parent.isCancelled())
                                        fail(new 
InsertException(InsertException.CANCELLED));
                                else


Reply via email to