thisflag should be declared as FlagSpecificData reference
With the current code there's now way that the seeder returns peers addresses upon dns requests. Thanks to @gandrewstone for good catch.
This commit is contained in:
parent
d5764c9149
commit
9e4e6342b7
1 changed files with 1 additions and 1 deletions
2
main.cpp
2
main.cpp
|
@ -217,7 +217,7 @@ public:
|
||||||
nets[NET_IPV6] = true;
|
nets[NET_IPV6] = true;
|
||||||
}
|
}
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
FlagSpecificData thisflag = perflag[requestedFlags];
|
FlagSpecificData& thisflag = perflag[requestedFlags];
|
||||||
thisflag.cacheHits++;
|
thisflag.cacheHits++;
|
||||||
if (force || thisflag.cacheHits * 400 > (thisflag.cache.size()*thisflag.cache.size()) || (thisflag.cacheHits*thisflag.cacheHits * 20 > thisflag.cache.size() && (now - thisflag.cacheTime > 5))) {
|
if (force || thisflag.cacheHits * 400 > (thisflag.cache.size()*thisflag.cache.size()) || (thisflag.cacheHits*thisflag.cacheHits * 20 > thisflag.cache.size() && (now - thisflag.cacheTime > 5))) {
|
||||||
set<CNetAddr> ips;
|
set<CNetAddr> ips;
|
||||||
|
|
Loading…
Add table
Reference in a new issue