summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2016-12-17 10:40:07 -0800
committerDana Powers <dana.powers@gmail.com>2017-01-19 11:10:04 -0800
commit4da18a97df672be6b0a687ac64d5221bd3196178 (patch)
treee612ffc5474c1e1b77191cd7ad501e9f48ba9779
parent3b66b403d86c5fde4ca53ac5893d6efec9c5f6d9 (diff)
downloadkafka-python-4da18a97df672be6b0a687ac64d5221bd3196178.tar.gz
Do not re-close a disconnected connection
-rw-r--r--kafka/conn.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/kafka/conn.py b/kafka/conn.py
index a75e6d8..bb9df69 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -207,7 +207,6 @@ class BrokerConnection(object):
def connect(self):
"""Attempt to connect and return ConnectionState"""
if self.state is ConnectionStates.DISCONNECTED:
- self.close()
log.debug('%s: creating new socket', str(self))
# if self.afi is set to AF_UNSPEC, then we need to do a name
# resolution and try all available address families