summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-12-03 22:10:02 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-12-03 22:10:02 (GMT)
commitc8802e3bef6b73d349a711b187c72aea0a3dd964 (patch)
tree09dbb588a363984e70c2aeaaca7b23a5b6cfb497
parentfc3e50bfb421348c333d6ed4acd79e5241caf120 (diff)
downloadswift-contrib-c8802e3bef6b73d349a711b187c72aea0a3dd964.zip
swift-contrib-c8802e3bef6b73d349a711b187c72aea0a3dd964.tar.bz2
Reinitialize the resolver on every query.
This hopefully fixes the DNS server caching behavior on network change.
-rw-r--r--Swiften/Network/PlatformDomainNameServiceQuery.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.cpp b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
index 13f5fc8..d6c87dc 100644
--- a/Swiften/Network/PlatformDomainNameServiceQuery.cpp
+++ b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
@@ -81,6 +81,8 @@ void PlatformDomainNameServiceQuery::doRun() {
DnsRecordListFree(responses, DnsFreeRecordList);
#else
+ // Make sure we reinitialize the domain list every time
+ res_init();
std::cout << "SRV: Querying " << service << std::endl;
ByteArray response;