Skip to content

Commit 9998604

Browse files
authored
KAFKA-5512; Awake the heartbeat thread when timetoNextHeartbeat is equal to 0 (#1439)
1 parent c920a2a commit 9998604

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kafka/coordinator/base.py

+4
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,10 @@ def poll_heartbeat(self):
314314
cause = self._heartbeat_thread.failed
315315
self._heartbeat_thread = None
316316
raise cause # pylint: disable-msg=raising-bad-type
317+
318+
# Awake the heartbeat thread if needed
319+
if self.heartbeat.should_heartbeat():
320+
self._lock.notify()
317321
self.heartbeat.poll()
318322

319323
def time_to_next_heartbeat(self):

0 commit comments

Comments
 (0)