do not send keep alive pings to upstream nodes

This commit is contained in:
Stephen Birarda 2017-06-12 16:23:57 -07:00
parent 880157695a
commit 63c8273a41

View file

@ -768,8 +768,10 @@ void NodeList::stopKeepalivePingTimer() {
}
void NodeList::sendKeepAlivePings() {
// send keep-alive ping packets to nodes of types we care about that are not relayed to us from an upstream node
eachMatchingNode([this](const SharedNodePointer& node)->bool {
return _nodeTypesOfInterest.contains(node->getType());
return !node->isUpstream() && _nodeTypesOfInterest.contains(node->getType());
}, [&](const SharedNodePointer& node) {
sendPacket(constructPingPacket(), *node);
});