summaryrefslogtreecommitdiff
path: root/kafka/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'kafka/util.py')
-rw-r--r--kafka/util.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/kafka/util.py b/kafka/util.py
index 10bf838..b3112d5 100644
--- a/kafka/util.py
+++ b/kafka/util.py
@@ -86,14 +86,17 @@ class ReentrantTimer(object):
self.timer = None
self.t = t
self.fn = fn
+ self.is_active = False
def start(self):
if self.timer is not None:
self.timer.cancel()
self.timer = Timer(self.t / 1000., self.fn)
+ self.is_active = True
self.timer.start()
def stop(self):
self.timer.cancel()
self.timer = None
+ self.is_active = False