summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2017-03-03 12:08:49 -0800
committerDana Powers <dana.powers@gmail.com>2017-03-03 14:17:07 -0800
commit97a661e39c1c7b67fda105102bef52b830620cc3 (patch)
tree2a4172bbdb781107677d6b0ea948ddd5ab9eaddb
parent315850c87759d8379899fbfdc6a882100d4a7020 (diff)
downloadkafka-python-ssl_handshake_errors.tar.gz
Catch socket errors during ssl handshakessl_handshake_errors
-rw-r--r--kafka/conn.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/kafka/conn.py b/kafka/conn.py
index ae3c55d..a678348 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -381,7 +381,7 @@ class BrokerConnection(object):
# old ssl in python2.6 will swallow all SSLErrors here...
except (SSLWantReadError, SSLWantWriteError):
pass
- except SSLZeroReturnError:
+ except (SSLZeroReturnError, ConnectionError):
log.warning('SSL connection closed by server during handshake.')
self.close(Errors.ConnectionError('SSL connection closed by server during handshake'))
# Other SSLErrors will be raised to user