yet another ThreadMaintainDHTNodes heuristic improvement

This commit is contained in:
Miguel Freitas 2013-10-29 10:48:06 -02:00
parent 68f3e97e65
commit 549ba353dd
2 changed files with 2 additions and 2 deletions

View File

@ -1235,7 +1235,7 @@ namespace libtorrent
, coalesce_writes(false)
, outgoing_ports(0,0)
, peer_tos(0)
, active_downloads(3)
, active_downloads(6)
, active_seeds(5)
, active_dht_limit(88) // don't announce more than once every 40 seconds
, active_tracker_limit(1600) // don't announce to trackers more than once every 1.125 seconds

View File

@ -258,7 +258,7 @@ void ThreadMaintainDHTNodes()
vector<CAddress> vAddr = addrman.GetAddr();
int totalNodesCandidates = (int)(vNodes.size() + vAddr.size());
if( (!dht_nodes && totalNodesCandidates) ||
dht_nodes < totalNodesCandidates / 2 ) {
(dht_nodes < 5 && totalNodesCandidates > 10) ) {
printf("ThreadMaintainDHTNodes: too few dht_nodes, trying to add some...\n");
BOOST_FOREACH(const CAddress &a, vAddr) {
std::string addr = a.ToStringIP();