mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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
This commit is contained in:
parent
bad9007019
commit
6d44694c7a
@ -29,6 +29,7 @@ void *solveDNSEntries(void *p)
|
|||||||
{
|
{
|
||||||
// get an address request
|
// get an address request
|
||||||
time_t now = time(NULL) ;
|
time_t now = time(NULL) ;
|
||||||
|
more_to_go = false ;
|
||||||
|
|
||||||
std::string next_call = "" ;
|
std::string next_call = "" ;
|
||||||
|
|
||||||
@ -73,7 +74,7 @@ void *solveDNSEntries(void *p)
|
|||||||
|
|
||||||
{
|
{
|
||||||
RsStackMutex mut(dnsr->_rdnsMtx) ;
|
RsStackMutex mut(dnsr->_rdnsMtx) ;
|
||||||
dnsr->_thread_running = false ;
|
*(dnsr->_thread_running) = false ;
|
||||||
}
|
}
|
||||||
return NULL ;
|
return NULL ;
|
||||||
}
|
}
|
||||||
@ -134,7 +135,10 @@ bool DNSResolver::getIPAddressFromString(const std::string& server_name,struct i
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!running)
|
if(!running)
|
||||||
|
{
|
||||||
|
std::cerr << "Launching reuqest!!"<< std::endl;
|
||||||
start_request();
|
start_request();
|
||||||
|
}
|
||||||
|
|
||||||
return false ;
|
return false ;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user