Author: toad
Date: 2007-12-22 16:25:50 +0000 (Sat, 22 Dec 2007)
New Revision: 16786

Modified:
   trunk/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
Only start the metadata insert in onMetadata() if EarlyEncode or if we've 
already called onSuccess().

Modified: trunk/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SingleFileInserter.java      
2007-12-22 15:14:06 UTC (rev 16785)
+++ trunk/freenet/src/freenet/client/async/SingleFileInserter.java      
2007-12-22 16:25:50 UTC (rev 16786)
@@ -518,7 +518,7 @@
                                        metadataPutter = new 
SingleFileInserter(parent, this, newBlock, true, ctx, false, getCHKOnly, false, 
token, false, true, metaPutterTargetFilename, earlyEncode);
                                        // If EarlyEncode, then start the 
metadata insert ASAP, to get the key.
                                        // Otherwise, wait until the data is 
fetchable (to improve persistence).
-                                       if(!(dataFetchable || earlyEncode)) 
return;
+                                       if(!(earlyEncode || 
splitInsertSuccess)) return;
                                }
                                if(logMINOR) Logger.minor(this, "Putting 
metadata on "+metadataPutter+" from "+sfi+" 
("+((SplitFileInserter)sfi).getLength()+ ')');
                        } catch (InsertException e1) {


Reply via email to