Fix bug in peer count.
This commit is contained in:
parent
4c24e0cfb0
commit
68d6d3c4ff
3 changed files with 5 additions and 5 deletions
|
@ -308,7 +308,7 @@ void Topology::clean(uint64_t now)
|
|||
}
|
||||
}
|
||||
|
||||
unsigned long Topology::countAlive() const
|
||||
unsigned long Topology::countActive() const
|
||||
{
|
||||
const uint64_t now = RR->node->now();
|
||||
unsigned long cnt = 0;
|
||||
|
@ -317,7 +317,7 @@ unsigned long Topology::countAlive() const
|
|||
Address *a = (Address *)0;
|
||||
SharedPtr<Peer> *p = (SharedPtr<Peer> *)0;
|
||||
while (i.next(a,p)) {
|
||||
if ((*p)->alive(now))
|
||||
if ((*p)->hasActiveDirectPath(now))
|
||||
++cnt;
|
||||
}
|
||||
return cnt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue