Commit 61c2259a authored by Marc Schink's avatar Marc Schink Committed by Marc Schink

Use account hostname for STUN server discovery

Use the account hostname instead of the target hostname of the
_xmpp-client._tcp SRV resource record for STUN server discovery.
Otherwise, discovery fails if both hostnames are different.
parent 2cd6634c
......@@ -1917,8 +1917,9 @@ def _discover_server_at_connection(self, con): = False # back to previous state
# Discover Stun server(s)
gajim.resolver.resolve('_stun._udp.' + helpers.idn_to_ascii(
self.connected_hostname), self._on_stun_resolved)
hostname = gajim.config.get_per('accounts',, 'hostname')
gajim.resolver.resolve('_stun._udp.' + helpers.idn_to_ascii(hostname),
def _on_stun_resolved(self, host, result_array):
if len(result_array) != 0:
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