diff options
author | Dana Powers <dana.powers@gmail.com> | 2018-03-10 19:29:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-10 19:29:25 -0500 |
commit | 9998604ac21227821a2d0ac99b47940c0b142226 (patch) | |
tree | 1a26bb4e97456dd4e9f5f41242051656d34dd749 | |
parent | c920a2acd88bd3f3d755846378b56b10990720cd (diff) | |
download | kafka-python-9998604ac21227821a2d0ac99b47940c0b142226.tar.gz |
KAFKA-5512; Awake the heartbeat thread when timetoNextHeartbeat is equal to 0 (#1439)
-rw-r--r-- | kafka/coordinator/base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kafka/coordinator/base.py b/kafka/coordinator/base.py index 57da971..bff6286 100644 --- a/kafka/coordinator/base.py +++ b/kafka/coordinator/base.py @@ -314,6 +314,10 @@ class BaseCoordinator(object): cause = self._heartbeat_thread.failed self._heartbeat_thread = None raise cause # pylint: disable-msg=raising-bad-type + + # Awake the heartbeat thread if needed + if self.heartbeat.should_heartbeat(): + self._lock.notify() self.heartbeat.poll() def time_to_next_heartbeat(self): |