Commit e740d127 authored by SW's avatar SW Committed by Philipp Hörist

Defer txt record lookup until connection attempt

Don't try to resolve _xmppconnect records for servers before trying to connect.
Prevent warnings from gajim.c.resolver for accounts with "connect on startup" disabled.
parent 113cd51c
Pipeline #1037 passed with stages
in 2 minutes and 2 seconds
......@@ -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 = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment