Skip to content

Commit

Permalink
KAFKA-5512; Awake the heartbeat thread when timetoNextHeartbeat is eq…
Browse files Browse the repository at this point in the history
…ual to 0 (dpkp#1439)
  • Loading branch information
dpkp authored Mar 11, 2018
1 parent c920a2a commit 9998604
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kafka/coordinator/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ def poll_heartbeat(self):
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):
Expand Down

0 comments on commit 9998604

Please sign in to comment.