mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
Add peer metric update block
This commit is contained in:
parent
a2d0c95b50
commit
ac49134aba
1 changed files with 13 additions and 0 deletions
|
@ -568,6 +568,19 @@ unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now)
|
|||
deletionOccurred = false;
|
||||
}
|
||||
}
|
||||
uint16_t alive_path_count_tmp = 0, dead_path_count_tmp = 0;
|
||||
for(unsigned int i=0;i<ZT_MAX_PEER_NETWORK_PATHS;++i) {
|
||||
if (_paths[i].p) {
|
||||
if (_paths[i].p->alive(now)) {
|
||||
alive_path_count_tmp++;
|
||||
}
|
||||
else {
|
||||
dead_path_count_tmp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
_alive_path_count = alive_path_count_tmp;
|
||||
_dead_path_count = dead_path_count_tmp;
|
||||
return sent;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue