Author: toad
Date: 2009-03-11 20:15:24 +0000 (Wed, 11 Mar 2009)
New Revision: 25997

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
Don't start an insert after compression if it has been cancelled in the 
meantime. Until this commit, removing an insert mid-compression would result in 
the insert still happening and being non-stoppable.


Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-03-11 20:13:41 UTC (rev 25996)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-03-11 20:15:24 UTC (rev 25997)
@@ -151,6 +151,10 @@
                        Logger.error(this, "Already started, not starting 
again", new Exception("error"));
                        return;
                }
+               if(cancelled) {
+                       Logger.error(this, "Already cancelled, not starting");
+                       return;
+               }
                try {
                        onCompressedInner(output, container, context);
                } catch (InsertException e) {

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

Reply via email to