Author: toad
Date: 2009-03-17 23:22:12 +0000 (Tue, 17 Mar 2009)
New Revision: 26074

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
Log:
Don't run onFailure twice, logging


Modified: 
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java     
2009-03-17 23:21:39 UTC (rev 26073)
+++ branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java     
2009-03-17 23:22:12 UTC (rev 26074)
@@ -199,12 +199,17 @@
 
        @Override
        public void onFailure(LowLevelPutException e, Object keyNum, 
ObjectContainer container, ClientContext context) {
+               synchronized(this) {
+                       if(finished) return;
+               }
                if(persistent)
                        container.activate(errors, 1);
                if(parent.isCancelled()) {
                        fail(new InsertException(InsertException.CANCELLED), 
container, context);
                        return;
                }
+               logMINOR = Logger.shouldLog(Logger.MINOR, this);
+               if(logMINOR) Logger.minor(this, "onFailure() on "+e+" for 
"+this);
                
                switch(e.code) {
                case LowLevelPutException.COLLISION:

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

Reply via email to