Author: toad
Date: 2008-06-26 16:52:00 +0000 (Thu, 26 Jun 2008)
New Revision: 20756
Modified:
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Deal with keyNum == null (=> failure not specific to a single key)
Modified:
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2008-06-26 16:39:20 UTC (rev 20755)
+++ branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2008-06-26 16:52:00 UTC (rev 20756)
@@ -513,7 +513,7 @@
return sub;
}
- private void fail(FetchException e, ObjectContainer container,
ClientContext context) {
+ void fail(FetchException e, ObjectContainer container, ClientContext
context) {
synchronized(this) {
if(finished) return;
finished = true;
Modified:
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
---
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
2008-06-26 16:39:20 UTC (rev 20755)
+++
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
2008-06-26 16:52:00 UTC (rev 20756)
@@ -253,7 +253,9 @@
forceFatal = true;
}
segment.errors.inc(e.getMode());
- if(e.isFatal() || forceFatal) {
+ if(e.isFatal() && token == null) {
+ segment.fail(e, container, context);
+ } else if(e.isFatal() || forceFatal) {
segment.onFatalFailure(e, ((Integer)token).intValue(),
this, container, context);
} else {
segment.onNonFatalFailure(e,
((Integer)token).intValue(), this, sched, container);