Author: toad
Date: 2009-04-01 14:18:33 +0000 (Wed, 01 Apr 2009)
New Revision: 26309

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
Don't need to cancel the other one, fail() will do that.


Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-04-01 14:15:20 UTC (rev 26308)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-04-01 14:18:33 UTC (rev 26309)
@@ -650,7 +650,6 @@
                        if(persistent) {
                                container.activate(block, 1);
                        }
-                       ClientPutState killMe = null;
                        boolean toFail = true;
                        boolean toRemove = false;
                        synchronized(this) {
@@ -659,7 +658,6 @@
                                        sfi = null;
                                        if(metadataPutter != null) {
                                                toFail = false;
-                                               killMe = metadataPutter;
                                                if(persistent) 
container.store(this);
                                        }
                                } else if(state == metadataPutter) {
@@ -667,7 +665,6 @@
                                        metadataPutter = null;
                                        if(sfi != null) {
                                                toFail = false;
-                                               killMe = sfi;
                                                if(persistent) 
container.store(this);
                                        }
                                } else {
@@ -679,11 +676,8 @@
                        }
                        if(toRemove && persistent)
                                state.removeFrom(container, context);
-                       if(killMe != null) {
-                               if(logMINOR) Logger.minor(this, "onFailure: 
killing "+killMe);
-                               killMe.cancel(container, context);
-                               // Should call back here and finish it
-                       }
+                       // fail() will cancel the other one, so we don't need 
to.
+                       // When it does, it will come back here, and we won't 
call fail(), because fail() has already set finished = true.
                        if(toFail)
                        fail(e, container, context);
                }

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

Reply via email to