From 6d44694c7a8970eb12cecfb67e9da263a9031c49 Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 25 Jan 2011 23:03:44 +0000 Subject: [PATCH] corrected bug in DNSSolver that caused high CPU usage git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3982 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/util/dnsresolver.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/util/dnsresolver.cc b/libretroshare/src/util/dnsresolver.cc index 3982afa20..30cc8e490 100644 --- a/libretroshare/src/util/dnsresolver.cc +++ b/libretroshare/src/util/dnsresolver.cc @@ -29,6 +29,7 @@ void *solveDNSEntries(void *p) { // get an address request time_t now = time(NULL) ; + more_to_go = false ; std::string next_call = "" ; @@ -73,7 +74,7 @@ void *solveDNSEntries(void *p) { RsStackMutex mut(dnsr->_rdnsMtx) ; - dnsr->_thread_running = false ; + *(dnsr->_thread_running) = false ; } return NULL ; } @@ -134,7 +135,10 @@ bool DNSResolver::getIPAddressFromString(const std::string& server_name,struct i } if(!running) + { + std::cerr << "Launching reuqest!!"<< std::endl; start_request(); + } return false ; }