tweak 2
This commit is contained in:
@ -27,7 +27,6 @@ class ConnThrottler {
|
|||||||
ConnThrottler(int max, int totalMax, long period) {
|
ConnThrottler(int max, int totalMax, long period) {
|
||||||
_max = max;
|
_max = max;
|
||||||
_totalMax = totalMax;
|
_totalMax = totalMax;
|
||||||
SimpleScheduler.getInstance().addPeriodicEvent(new Cleaner(), period);
|
|
||||||
if (max > 0)
|
if (max > 0)
|
||||||
this.counter = new ObjectCounter();
|
this.counter = new ObjectCounter();
|
||||||
else
|
else
|
||||||
@ -36,6 +35,7 @@ class ConnThrottler {
|
|||||||
_currentTotal = new AtomicInteger();
|
_currentTotal = new AtomicInteger();
|
||||||
else
|
else
|
||||||
_currentTotal = null;
|
_currentTotal = null;
|
||||||
|
SimpleScheduler.getInstance().addPeriodicEvent(new Cleaner(), period);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** increments before checking */
|
/** increments before checking */
|
||||||
|
Reference in New Issue
Block a user