From 617ca79b8f9be5cec9f352de7f1074c92671a228 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sat, 5 Jun 2010 01:07:29 +0000 Subject: [PATCH] conn throttler fix when only total configured --- .../java/src/net/i2p/client/streaming/ConnThrottler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/ConnThrottler.java b/apps/streaming/java/src/net/i2p/client/streaming/ConnThrottler.java index 07430e7511..5383873e9c 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/ConnThrottler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/ConnThrottler.java @@ -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 -- GitLab