diff options
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r-- | node/Peer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp index 0f471b07..1d581ab8 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -349,12 +349,14 @@ float Peer::computeAggregateLinkPacketDelayVariance() float Peer::computeAggregateLinkMeanLatency() { float ml = 0.0; + int pathCount = 0; for(unsigned int i=0;i<ZT_MAX_PEER_NETWORK_PATHS;++i) { if (_paths[i].p) { + pathCount++; ml += _paths[i].p->relativeQuality() * _paths[i].p->meanLatency(); } } - return ml; + return ml / pathCount; } int Peer::aggregateLinkPhysicalPathCount() |