conn throttler fix when only total configured

This commit is contained in:
zzz
2010-06-05 01:07:29 +00:00
parent 7bfb5b1bf4
commit 617ca79b8f

View File

@ -27,12 +27,11 @@ class ConnThrottler {
ConnThrottler(int max, int totalMax, long period) {
_max = max;
_totalMax = totalMax;
if (max > 0) {
SimpleScheduler.getInstance().addPeriodicEvent(new Cleaner(), period);
SimpleScheduler.getInstance().addPeriodicEvent(new Cleaner(), period);
if (max > 0)
this.counter = new ObjectCounter();
} else {
else
this.counter = null;
}
if (totalMax > 0)
_currentTotal = new AtomicInteger();
else