Author: toad
Date: 2009-03-12 19:02:46 +0000 (Thu, 12 Mar 2009)
New Revision: 26008

Modified:
   
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerBase.java
Log:
Detect double matches, log and don't call twice; seen something like this in 
practice, debugging...


Modified: 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerBase.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerBase.java  
    2009-03-12 19:01:58 UTC (rev 26007)
+++ 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerBase.java  
    2009-03-12 19:02:46 UTC (rev 26008)
@@ -307,6 +307,10 @@
                        for(KeyListener listener : keyListeners) {
                                if(!listener.probablyWantKey(key, saltedKey)) 
continue;
                                if(matches == null) matches = new 
ArrayList<KeyListener> ();
+                               if(matches.contains(listener)) {
+                                       Logger.error(this, "In matches twice, 
presumably in keyListeners twice?: "+listener);
+                                       continue;
+                               }
                                matches.add(listener);
                        }
                }

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to