Author: toad
Date: 2005-11-17 22:35:26 +0000 (Thu, 17 Nov 2005)
New Revision: 7550

Modified:
   trunk/freenet/src/freenet/client/SplitFetcher.java
   trunk/freenet/src/freenet/node/Version.java
Log:
Fix long pauses between segments while fetching splitfiles.

Modified: trunk/freenet/src/freenet/client/SplitFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/SplitFetcher.java  2005-11-17 22:21:20 UTC 
(rev 7549)
+++ trunk/freenet/src/freenet/client/SplitFetcher.java  2005-11-17 22:35:26 UTC 
(rev 7550)
@@ -138,18 +138,18 @@
                        synchronized(this) {
                                if(fetchingSegment == null) {
                                        // Pick a random segment
-                                       Segment s = chooseUnstartedSegment();
-                                       if(s == null) {
+                                       fetchingSegment = 
chooseUnstartedSegment();
+                                       if(fetchingSegment == null) {
                                                // All segments have started
                                        } else {
-                                               s.start();
+                                               fetchingSegment.start();
                                        }
                                }
                                if(allSegmentsFinished) {
                                        return finalStatus();
                                }
                                try {
-                                       wait(100*1000); // or wait()?
+                                       wait(10*1000); // or wait()?
                                } catch (InterruptedException e) {
                                        // Ignore
                                }

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2005-11-17 22:21:20 UTC (rev 
7549)
+++ trunk/freenet/src/freenet/node/Version.java 2005-11-17 22:35:26 UTC (rev 
7550)
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       public static final int buildNumber = 185;
+       public static final int buildNumber = 186;

        /** Oldest build of Fred we will talk to */
        public static final int lastGoodBuild = 185;


Reply via email to