Author: toad
Date: 2008-04-02 01:08:37 +0000 (Wed, 02 Apr 2008)
New Revision: 18904
Modified:
trunk/freenet/src/freenet/client/async/RequestCooldownQueue.java
Log:
Enforce MIN_SIZE when expanding the queue.
Modified: trunk/freenet/src/freenet/client/async/RequestCooldownQueue.java
===================================================================
--- trunk/freenet/src/freenet/client/async/RequestCooldownQueue.java
2008-04-02 01:07:05 UTC (rev 18903)
+++ trunk/freenet/src/freenet/client/async/RequestCooldownQueue.java
2008-04-02 01:08:37 UTC (rev 18904)
@@ -214,6 +214,7 @@
holes = 0;
}
int newSize = (keys.length - holes) * 2;
+ if(newSize < MIN_SIZE) newSize = MIN_SIZE;
// FIXME reuse the old buffers if it fits
Key[] newKeys = new Key[newSize];
long[] newTimes = new long[newSize];