core: connectToIrc: Prevent DNS leaks on connection when using proxy
[quassel.git] / src / core / corenetwork.cpp
index 0ebcd19..53960b6 100644 (file)
@@ -218,8 +218,9 @@ void CoreNetwork::connectToIrc(bool reconnecting)
 
     // Qt caches DNS entries for a minute, resulting in round-robin (e.g. for chat.freenode.net) not working if several users
     // connect at a similar time. QHostInfo::fromName(), however, always performs a fresh lookup, overwriting the cache entry.
-    QHostInfo::fromName(server.host);
-
+    if (! server.useProxy) {
+               QHostInfo::fromName(server.host);
+       }
 #ifdef HAVE_SSL
     if (server.useSsl) {
         CoreIdentity *identity = identityPtr();