Skip to content
Snippets Groups Projects
Commit c7d33bb6 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

register Disconnect handler soon enough

parent 150979b3
No related branches found
No related tags found
No related merge requests found
......@@ -615,11 +615,11 @@ def _connect_success(self, con, con_type):
if _con_type != self._current_type:
self.connect_to_next_type()
return
con.RegisterDisconnectHandler(self._on_disconnected)
if _con_type == 'plain' and gajim.config.get_per('accounts', self.name,
'warn_when_plaintext_connection'):
self.dispatch('PLAIN_CONNECTION', (con,))
return True
con.RegisterDisconnectHandler(self._on_disconnected)
if _con_type in ('tls', 'ssl') and not hasattr(con.Connection,
'_sslContext') and gajim.config.get_per('accounts', self.name,
'warn_when_insecure_ssl_connection') and \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment