From 5e92a7027863c359685c700a0b581dbaf689a180 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sat, 17 Dec 2016 10:40:07 -0800 Subject: Do not re-close a disconnected connection --- kafka/conn.py | 1 - 1 file changed, 1 deletion(-) (limited to 'kafka/conn.py') diff --git a/kafka/conn.py b/kafka/conn.py index 9951cd5..8cb3587 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 -- cgit v1.2.1