Remove some (now) useless returns that where added because of a broken commit of mine...
This commit is contained in:
parent
2b0ef67c55
commit
f8e6635edf
|
@ -356,12 +356,12 @@ class NonBlockingClient:
|
||||||
if self.desired_security == 'plain':
|
if self.desired_security == 'plain':
|
||||||
# if we want and have plain connection, we're done now
|
# if we want and have plain connection, we're done now
|
||||||
self._on_connect()
|
self._on_connect()
|
||||||
return
|
|
||||||
else:
|
else:
|
||||||
# try to negotiate TLS
|
# try to negotiate TLS
|
||||||
if self.incoming_stream_version() != '1.0':
|
if self.incoming_stream_version() != '1.0':
|
||||||
# if stream version is less than 1.0, we can't do more
|
# if stream version is less than 1.0, we can't do more
|
||||||
log.warn('While connecting with type = "tls": stream version is less than 1.0')
|
log.warn('While connecting with type = "tls": stream version ' +
|
||||||
|
'is less than 1.0')
|
||||||
self._on_connect()
|
self._on_connect()
|
||||||
if self.Dispatcher.Stream.features.getTag('starttls'):
|
if self.Dispatcher.Stream.features.getTag('starttls'):
|
||||||
# Server advertises TLS support, start negotiation
|
# Server advertises TLS support, start negotiation
|
||||||
|
@ -369,16 +369,14 @@ class NonBlockingClient:
|
||||||
log.info('TLS supported by remote server. Requesting TLS start.')
|
log.info('TLS supported by remote server. Requesting TLS start.')
|
||||||
self._tls_negotiation_handler()
|
self._tls_negotiation_handler()
|
||||||
else:
|
else:
|
||||||
log.warn('While connecting with type = "tls": TLS unsupported by remote server')
|
log.warn('While connecting with type = "tls": TLS unsupported ' +
|
||||||
|
'by remote server')
|
||||||
self._on_connect()
|
self._on_connect()
|
||||||
return
|
|
||||||
|
|
||||||
elif self.connected in ['ssl', 'tls']:
|
elif self.connected in ['ssl', 'tls']:
|
||||||
self._on_connect()
|
self._on_connect()
|
||||||
return
|
|
||||||
else:
|
else:
|
||||||
log.error('Stream opened for unsupported connection: %s' %
|
assert False, 'Stream opened for unsupported connection'
|
||||||
(self.connected or 'Disconnected'))
|
|
||||||
|
|
||||||
def _tls_negotiation_handler(self, con=None, tag=None):
|
def _tls_negotiation_handler(self, con=None, tag=None):
|
||||||
''' takes care of TLS negotioation with <starttls> '''
|
''' takes care of TLS negotioation with <starttls> '''
|
||||||
|
|
Loading…
Reference in New Issue