Skip to content
Snippets Groups Projects
Commit f22a8898 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

don't forget to send candidate-error when we get only a local IP

parent 41e1c557
No related branches found
No related tags found
No related merge requests found
......@@ -118,14 +118,18 @@ class SocksQueue:
file_props = FilesProp.getFileProp(account, sid)
file_props.failure_cb = on_failure
con = gajim.connections[account]
if not file_props.streamhosts:
on_failure(file_props.sid)
# add streamhosts to the queue
streamhosts_to_test = []
# Remove local IPs to not connect to ourself
for streamhost in file_props.streamhosts:
if streamhost['host'] == '127.0.0.1' or \
streamhost['host'] == '::1' or \
streamhost['host'] == con.peerhost[0]:
continue
streamhosts_to_test.append(streamhost)
if not streamhosts_to_test:
on_failure(file_props.sid)
# add streamhosts to the queue
for streamhost in streamhosts_to_test:
if 'type' in streamhost and streamhost['type'] == 'proxy':
fp = None
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment