Fix round-robin for networks that support it
authorManuel Nickschas <sputnick@quassel-irc.org>
Fri, 14 Mar 2014 20:13:09 +0000 (21:13 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 14 Mar 2014 20:13:09 +0000 (21:13 +0100)
Some IRC networks perform round-robin by supplying a list of IP addresses
in their DNS records. However, Qt a) always uses the first address of that
list, and b) caches DNS records for a minute. This results that users who
connect at a roughly similar time (like at core startup) will all pick the
same IP for a given round-robin network address.

We now force Qt (simply by calling QHostInfo::fromName()) to perform a fresh
lookup every time it connects to an IRC network, which solves this problem.
However, this will not help you if your OS uses a system DNS cache that does
not reshuffle the list of IPs for repeated lookups.


No differences found