Author: toad
Date: 2008-02-23 22:27:26 +0000 (Sat, 23 Feb 2008)
New Revision: 18144

Modified:
   trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Don't ask the segment to remove us, it already has. Fixes "Segment finished but 
didn't tell us!"

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2008-02-23 22:12:10 UTC (rev 18143)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2008-02-23 22:27:26 UTC (rev 18144)
@@ -362,7 +362,11 @@
                }

        }
-       
+
+       /**
+        * Terminate a subsegment. Called by the segment, which will have 
already removed the
+        * subsegment from the list.
+        */
        public void kill() {
                if(logMINOR)
                        Logger.minor(this, "Killing "+this);
@@ -372,8 +376,6 @@
                        blockNums.clear();
                        cancelled = true;
                }
-               if(!segment.maybeRemoveSeg(this))
-                       Logger.error(this, "Could not remove subsegment: 
"+this+" from "+segment+" for some reason in kill()!");
        }

        public long getCooldownWakeup(Object token) {


Reply via email to