From 6ede969f5f4d69235359687157466af0b9e76278 Mon Sep 17 00:00:00 2001 From: js Date: Sat, 10 Jan 2009 22:46:26 +0000 Subject: [PATCH] Fix missing returns, so we don't run into that assert. --- src/common/xmpp/client_nb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/xmpp/client_nb.py b/src/common/xmpp/client_nb.py index a97266933..91e30838f 100644 --- a/src/common/xmpp/client_nb.py +++ b/src/common/xmpp/client_nb.py @@ -346,6 +346,7 @@ class NonBlockingClient: if self.desired_security == 'plain': # if we want and have plain connection, we're done now self._on_connect() + return else: # try to negotiate TLS if self.incoming_stream_version() != '1.0': @@ -358,12 +359,15 @@ class NonBlockingClient: self.stream_started = False log.info('TLS supported by remote server. Requesting TLS start.') self._tls_negotiation_handler() + return else: log.warn('While connecting with type = "tls": TLS unsupported by remote server') self._on_connect() + return elif self.connected in ['ssl', 'tls']: self._on_connect() + return assert False # should never be reached def _tls_negotiation_handler(self, con=None, tag=None):