diff --git a/gajim/common/connection.py b/gajim/common/connection.py index 4cc05f3fe..7e16157ce 100644 --- a/gajim/common/connection.py +++ b/gajim/common/connection.py @@ -709,11 +709,6 @@ class Connection(CommonConnection, ConnectionHandlers): self._nec_gc_stanza_message_outgoing) app.ged.register_event_handler('stanza-message-outgoing', ged.OUT_CORE, self._nec_stanza_message_outgoing) - - h = app.config.get_per('accounts', self.name, 'hostname') - if h: - app.resolver.resolve('_xmppconnect.' + helpers.idn_to_ascii(h), - self._on_resolve_txt, type_='txt') # END __init__ def cleanup(self): @@ -1093,6 +1088,10 @@ class Connection(CommonConnection, ConnectionHandlers): ] self._hostname = hostname + if h: + app.resolver.resolve('_xmppconnect.' + helpers.idn_to_ascii(h), + self._on_resolve_txt, type_='txt') + if use_srv and self._proxy is None: self._srv_hosts = []