r26959 - trunk/freenet/src/freenet/client/async

[email protected] Sat, 18 Apr 2009 13:13:30 +0000
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: toad
Date: 2009-04-18 13:13:29 +0000 (Sat, 18 Apr 2009)
New Revision: 26959

Modified:
   trunk/freenet/src/freenet/client/async/USKManager.java
Log:
Temporary background fetchers started by USK fetches had pollForever = true, hence were running forever (until dropped out of the LRU); a /-1/ could thus run for a *VERY* long time, and would never call the callback because we don't call callbacks if pollForever=true.


Modified: trunk/freenet/src/freenet/client/async/USKManager.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKManager.java	2009-04-18 13:01:31 UTC (rev 26958)
+++ trunk/freenet/src/freenet/client/async/USKManager.java	2009-04-18 13:13:29 UTC (rev 26959)
@@ -41,6 +41,7 @@
 	/** Backgrounded USKFetchers by USK. */
 	final HashMap<USK, USKFetcher> backgroundFetchersByClearUSK;
 	
+	/** These must be TEMPORARY, that is, they must NOT poll forever! */
 	final LRUQueue<USK> temporaryBackgroundFetchersLRU;
 	
 	final FetchContext backgroundFetchContext;
@@ -126,7 +127,7 @@
 //			}
 			USKFetcher f = backgroundFetchersByClearUSK.get(clear);
 			if(f == null) {
-				f = new USKFetcher(usk, this, backgroundFetchContext, new USKFetcherWrapper(usk, RequestStarter.UPDATE_PRIORITY_CLASS, this), 3, true, false);
+				f = new USKFetcher(usk, this, backgroundFetchContext, new USKFetcherWrapper(usk, RequestStarter.UPDATE_PRIORITY_CLASS, this), 3, false, false);
 				sched = f;
 				backgroundFetchersByClearUSK.put(clear, f);
 			}