Update comment from #2690 about ssl module exceptions.
raise
except ssl.CertificateError as err:
# CertificateError can happen during handshake (hostname
- # verification) and should be passed to user
+ # verification) and should be passed to user. Starting
+ # in Python 3.7, this error is a subclass of SSLError
+ # and will be handled by the previous block instead.
return self.close(exc_info=err)
except socket.error as err:
# Some port scans (e.g. nmap in -sT mode) have been known