Comment 12 for bug 487313

Revision history for this message
In , Guillaume-desmottes (guillaume-desmottes) wrote :

(In reply to comment #5)
> http://git.collabora.co.uk/?p=user/cassidy/telepathy-gabble;a=commitdiff;h=2775d305c67fb
>
> I'd prefer the style "fd.o#21151: Don't query SOCKS5 proxies when we are
> connected" in future. Otherwise, review+ from me.

I rebased on top of the new master and fixed the commit msg.

> Does it backport readily to 0.8? We need this on both branches.

Didn't check yet but hopefully that should be fine.

 (In reply to comment #6)
> review+ from me too, but two queries before we merge given that we obviously
> end up querying the same streamhost repeatedly:
> 1. What happens when this has happened >5 times? Do we discard the oldest 6th,
> or do we end up with an ever-growing list of streamhosts?
> 2. In the likely case our server has remained connected to the same proxy, do
> we remove duplicates from the answers, or do we possibly end up sending the
> same stream host 5 times in a S5B initiation?

Actually, with current code, we'll query the proxy.telepathy.im only once (proxy is removed from the socks5_potential_proxies list once we went the query).

D) will fix that by improving the bytestream factory to work better with the DNS round robin server:
- don't remove proxy from the list once the query has been sent
- be sure to not add twice the same (jid, host, port) to our list of discovered proxies
- remove old proxies from the list after we disocevered $N newer proxies