Author: toad
Date: 2008-06-18 22:06:31 +0000 (Wed, 18 Jun 2008)
New Revision: 20461

Modified:
   branches/db4o/freenet/src/freenet/node/RequestStarter.java
Log:
Fix NPE.
Also reduce the polling interval to 1 second for now.

Modified: branches/db4o/freenet/src/freenet/node/RequestStarter.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/RequestStarter.java  2008-06-18 
20:08:32 UTC (rev 20460)
+++ branches/db4o/freenet/src/freenet/node/RequestStarter.java  2008-06-18 
22:06:31 UTC (rev 20461)
@@ -165,7 +165,7 @@
                                        req = getRequest();
                                        if(req == null) {
                                                try {
-                                                       wait(100*1000); // as 
close to indefinite as I'm comfortable with! Toad
+                                                       wait(1*1000); // as 
close to indefinite as I'm comfortable with! Toad
                                                } catch (InterruptedException 
e) {
                                                        // Ignore
                                                }
@@ -218,7 +218,7 @@
        }

        private boolean startRequest(ChosenRequest req, boolean logMINOR) {
-               if(sched.fetchingKeys().hasKey(req.key)) return false;
+               if((!isInsert) && sched.fetchingKeys().hasKey(req.key)) return 
false;
                core.getExecutor().execute(new SenderThread(req.request, 
req.token, req.key, req.ckey), "RequestStarter$SenderThread for "+req);
                return true;
        }


Reply via email to