Philipp Hörist pushed to branch master at gajim / gajim
Commits: e740d127 by Sebastian Wagner at 2018-03-05T22:55:25+01:00 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.
- - - - -
1 changed file:
- gajim/common/connection.py
Changes:
===================================== gajim/common/connection.py ===================================== --- 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 = []
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/e740d12727032bc4bd382c1a128394cac90...
--- View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/e740d12727032bc4bd382c1a128394cac90... You're receiving this email because of your account on dev.gajim.org.