Merge branch 'stun_discovery' into 'master'
Use account hostname for STUN server discovery See merge request !93
This commit is contained in:
commit
6e8e5aec51
|
@ -1917,8 +1917,9 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
|
|
||||||
self.sm.resuming = False # back to previous state
|
self.sm.resuming = False # back to previous state
|
||||||
# Discover Stun server(s)
|
# Discover Stun server(s)
|
||||||
gajim.resolver.resolve('_stun._udp.' + helpers.idn_to_ascii(
|
hostname = gajim.config.get_per('accounts', self.name, 'hostname')
|
||||||
self.connected_hostname), self._on_stun_resolved)
|
gajim.resolver.resolve('_stun._udp.' + helpers.idn_to_ascii(hostname),
|
||||||
|
self._on_stun_resolved)
|
||||||
|
|
||||||
def _on_stun_resolved(self, host, result_array):
|
def _on_stun_resolved(self, host, result_array):
|
||||||
if len(result_array) != 0:
|
if len(result_array) != 0:
|
||||||
|
|
Loading…
Reference in New Issue