Using a IPv6 local address to connect to a IPv4 relay just creates an
extra discovery attempt that will not provide something useful.
This commit fixes another place of TURN discovery creation which was
omitted in
fc0d3744ebc03f8137866170594968ba61e6be30. In my case it cuts
down up to ~15 seconds from candidate gathering phase, making it almost
instantaneous.
Reviewed-by: Olivier CrĂȘte <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1709
if (agent->full_mode && component &&
transport != NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE) {
GList *item;
+ int host_ip_version = nice_address_ip_version (&host_candidate->addr);
for (item = component->turn_servers; item; item = item->next) {
TurnServer *turn = item->data;
+ if (host_ip_version != nice_address_ip_version (&turn->server)) {
+ continue;
+ }
+
priv_add_new_candidate_discovery_turn (agent,
host_candidate->sockptr,
turn,