diff options
author | Ross Duggan <ross@barricade.io> | 2015-09-14 16:30:01 +0100 |
---|---|---|
committer | Ross Duggan <ross@barricade.io> | 2015-09-14 16:30:01 +0100 |
commit | 7e19de555007b1059af78097aa70c8810a473513 (patch) | |
tree | b1a1172b319e404d8e4f7788ba87fbd6fc3ae66e /kafka/conn.py | |
parent | b525e1a8d63e4fcb0ede43c05739bc84c85cc79c (diff) | |
download | kafka-python-7e19de555007b1059af78097aa70c8810a473513.tar.gz |
Support retry semantics in MultiProcessConsumer
Diffstat (limited to 'kafka/conn.py')
-rw-r--r-- | kafka/conn.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kafka/conn.py b/kafka/conn.py index 432e10b..e6a1f74 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -151,6 +151,10 @@ class KafkaConnection(local): """ log.debug("Reading response %d from Kafka" % request_id) + # Make sure we have a connection + if not self._sock: + self.reinit() + # Read the size off of the header resp = self._read_bytes(4) (size,) = struct.unpack('>i', resp) |