Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-09-17 15:02:01 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-09-17 15:02:01 +0300
commitb93098a3792253b277562bf7bceaa8c8ced0a149 (patch)
treeb36196be6f6070c2fc2b8756e6c9e5c1b9925a62
parent2c9d5d838bd5a451835124712fb67bc742cd4254 (diff)
Dont use Resolver when using a proxy
This leaks the DNS request
-rw-r--r--gajim/common/connection.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/gajim/common/connection.py b/gajim/common/connection.py
index 9a06f173f..835cf1b0a 100644
--- a/gajim/common/connection.py
+++ b/gajim/common/connection.py
@@ -1083,7 +1083,8 @@ class Connection(CommonConnection, ConnectionHandlers):
self._hosts = [ {'host': h, 'port': p, 'ssl_port': ssl_p, 'prio': 10,
'weight': 10} ]
self._hostname = hostname
- if use_srv:
+
+ if use_srv and self._proxy is None:
# add request for srv query to the resolve, on result '_on_resolve'
# will be called
app.resolver.resolve('_xmpp-client._tcp.' + helpers.idn_to_ascii(
@@ -1823,9 +1824,10 @@ class Connection(CommonConnection, ConnectionHandlers):
self.sm.resuming = False # back to previous state
# Discover Stun server(s)
- hostname = app.config.get_per('accounts', self.name, 'hostname')
- app.resolver.resolve('_stun._udp.' + helpers.idn_to_ascii(hostname),
- self._on_stun_resolved)
+ if self._proxy is None:
+ hostname = app.config.get_per('accounts', self.name, 'hostname')
+ app.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: