diff options
author | Dana Powers <dana.powers@gmail.com> | 2017-03-03 16:44:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-03 16:44:02 -0800 |
commit | f0061624d8dc05626389b3c3d97a97b9253938ef (patch) | |
tree | 5f8698304ab041bd9050abb185b5b2a98b0fff16 | |
parent | 7b727ab92b891a2aa053f83480c271692f7e2638 (diff) | |
download | kafka-python-f0061624d8dc05626389b3c3d97a97b9253938ef.tar.gz |
Catch socket errors during ssl handshake (#1007)
-rw-r--r-- | kafka/conn.py | 2 |
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 |