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.
This commit is contained in:
parent
2cd6634c0e
commit
61c2259a9a
|
@ -1917,8 +1917,9 @@ class Connection(CommonConnection, ConnectionHandlers):
|
|||
|
||||
self.sm.resuming = 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', self.name, 'hostname')
|
||||
gajim.resolver.resolve('_stun._udp.' + helpers.idn_to_ascii(hostname),
|
||||
self._on_stun_resolved)
|
||||
|
||||
def _on_stun_resolved(self, host, result_array):
|
||||
if len(result_array) != 0:
|
||||
|
|
Loading…
Reference in New Issue