Skip to content

Commit 1904b53

Browse files
danjo133dpkp
authored andcommitted
Catch thrown OSError by python 3.7 when creating a connection (#1694)
1 parent c0add71 commit 1904b53

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kafka/conn.py

+3
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,9 @@ def _try_handshake(self):
483483
# old ssl in python2.6 will swallow all SSLErrors here...
484484
except (SSLWantReadError, SSLWantWriteError):
485485
pass
486+
# python 3.7 throws OSError
487+
except OSError:
488+
pass
486489
except (SSLZeroReturnError, ConnectionError, SSLEOFError):
487490
log.warning('SSL connection closed by server during handshake.')
488491
self.close(Errors.KafkaConnectionError('SSL connection closed by server during handshake'))

0 commit comments

Comments
 (0)