summaryrefslogtreecommitdiff
path: root/kafka/client_async.py
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2019-09-29 17:07:03 -0700
committerGitHub <noreply@github.com>2019-09-29 17:07:03 -0700
commit0f929bd866f1526fc5d18068c31903f1ae3393d2 (patch)
tree9b5e7173086e5d10345a82d65c64ea97d46a7fa5 /kafka/client_async.py
parent392d674be6641078717a4d87e471916c9a4bbb22 (diff)
downloadkafka-python-0f929bd866f1526fc5d18068c31903f1ae3393d2.tar.gz
Change coordinator lock acquisition order (#1821)
Diffstat (limited to 'kafka/client_async.py')
-rw-r--r--kafka/client_async.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py
index 9b9cb8f..b002797 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -597,7 +597,9 @@ class KafkaClient(object):
self._poll(timeout / 1000)
- responses.extend(self._fire_pending_completed_requests())
+ # called without the lock to avoid deadlock potential
+ # if handlers need to acquire locks
+ 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