@@ -940,21 +940,17 @@ def _run_once(self):
940
940
self .disable ()
941
941
return
942
942
943
- # TODO: When consumer.wakeup() is implemented, we need to
944
- # disable here to prevent propagating an exception to this
945
- # heartbeat thread
946
- #
947
- # Release coordinator lock during client poll to avoid deadlocks
948
- # if/when connection errback needs coordinator lock
949
- self .coordinator ._client .poll (timeout_ms = 0 )
950
-
951
- if self .coordinator .coordinator_unknown ():
952
- future = self .coordinator .lookup_coordinator ()
953
- if not future .is_done or future .failed ():
954
- # the immediate future check ensures that we backoff
955
- # properly in the case that no brokers are available
956
- # to connect to (and the future is automatically failed).
957
- with self .coordinator ._lock :
943
+ # TODO: When consumer.wakeup() is implemented, we need to
944
+ # disable here to prevent propagating an exception to this
945
+ # heartbeat thread
946
+ self .coordinator ._client .poll (timeout_ms = 0 )
947
+
948
+ if self .coordinator .coordinator_unknown ():
949
+ future = self .coordinator .lookup_coordinator ()
950
+ if not future .is_done or future .failed ():
951
+ # the immediate future check ensures that we backoff
952
+ # properly in the case that no brokers are available
953
+ # to connect to (and the future is automatically failed).
958
954
self .coordinator ._lock .wait (self .coordinator .config ['retry_backoff_ms' ] / 1000 )
959
955
960
956
elif self .coordinator .heartbeat .session_timeout_expired ():
0 commit comments