diff options
-rw-r--r-- | kafka/client_async.py | 4 | ||||
-rw-r--r-- | kafka/coordinator/base.py | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py index ccf1e4b..0cb575c 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -571,9 +571,7 @@ class KafkaClient(object): self._poll(timeout) - # called without the lock to avoid deadlock potential - # if handlers need to acquire locks - responses.extend(self._fire_pending_completed_requests()) + responses.extend(self._fire_pending_completed_requests()) # If all we had was a timeout (future is None) - only do one poll # If we do have a future, we keep looping until it is done diff --git a/kafka/coordinator/base.py b/kafka/coordinator/base.py index 7deeaf0..8ce9a24 100644 --- a/kafka/coordinator/base.py +++ b/kafka/coordinator/base.py @@ -347,7 +347,7 @@ class BaseCoordinator(object): def ensure_active_group(self): """Ensure that the group is active (i.e. joined and synced)""" - with self._lock: + with self._client._lock, self._lock: if self._heartbeat_thread is None: self._start_heartbeat_thread() |