register Disconnect handler soon enough
This commit is contained in:
parent
150979b3ab
commit
c7d33bb68e
|
@ -615,11 +615,11 @@ class Connection(ConnectionHandlers):
|
|||
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 \
|
||||
|
|
Loading…
Reference in New Issue