Fix a mistake in Connection._do_tls_handshake(): return on exception,
log ssl.SSLError reason and discard the node.
This commit is contained in:
parent
d06beded72
commit
5a65978678
|
@ -231,7 +231,10 @@ class Connection(threading.Thread):
|
||||||
'Disconnecting from %s:%s. Reason: %s',
|
'Disconnecting from %s:%s. Reason: %s',
|
||||||
self.host_print, self.port, e)
|
self.host_print, self.port, e)
|
||||||
self.status = 'disconnecting'
|
self.status = 'disconnecting'
|
||||||
break
|
if isinstance(e, ssl.SSLError): # pylint: disable=no-member
|
||||||
|
logging.debug('ssl.SSLError reason: %s', e.reason)
|
||||||
|
shared.node_pool.discard((self.host, self.port))
|
||||||
|
return
|
||||||
self.tls = True
|
self.tls = True
|
||||||
logging.debug(
|
logging.debug(
|
||||||
'Established TLS connection with %s:%s (%s)',
|
'Established TLS connection with %s:%s (%s)',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user