Author: toad
Date: 2009-04-03 14:00:29 +0000 (Fri, 03 Apr 2009)
New Revision: 26435
Modified:
trunk/freenet/src/freenet/client/async/MultiPutCompletionCallback.java
Log:
Closer to old logic: if we get a cancelled after something else, report the
something else. But don't leak.
Modified: trunk/freenet/src/freenet/client/async/MultiPutCompletionCallback.java
===================================================================
--- trunk/freenet/src/freenet/client/async/MultiPutCompletionCallback.java
2009-04-03 13:55:53 UTC (rev 26434)
+++ trunk/freenet/src/freenet/client/async/MultiPutCompletionCallback.java
2009-04-03 14:00:29 UTC (rev 26435)
@@ -124,9 +124,17 @@
synchronized(this) {
if(finished) return;
finished = true;
- if(e != null && this.e != null && this.e != e &&
persistent) {
- container.activate(this.e, 10);
- this.e.removeFrom(container);
+ if(e != null && this.e != null && this.e != e) {
+ if(persistent) container.activate(this.e, 10);
+ if(!(e.getMode() == InsertException.CANCELLED))
{ // Cancelled is okay, ignore it, we cancel after failure sometimes.
+ // Ignore the new failure mode, use the
old one
+ e = this.e;
+ } else {
+ // Delete the old failure mode, use the
new one
+ this.e.removeFrom(container);
+ this.e = e;
+ }
+
}
if(e == null) {
e = this.e;
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs