Skip to content

gnetworkaddress: fix "happy eyeballs" logic

Allison Karlitskaya requested to merge wip/desrt/happier-eyeballs into master

The "happy eyeballs" RFC states that on receiving a negative response for an IPv6 address lookup, we should wait for the IPv4 lookup to complete and use any results we get from there.

The current code was not doing that: it was rather setting a timeout for failing the resolution entirely. In scenarios where the IPv4 response comes more than 50ms after the IPv6 response (which is easily attainable under valgrind in certain configurations) this means that the IPv4 response will never come.

Remove the timeout and just wait.

Edited by Allison Karlitskaya

Merge request reports