From 2929573cb09f46018121d3815f1ea16f5f864b78 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 12 Jun 2017 11:42:46 -0700 Subject: [PATCH] do not punch to replicant nodes --- libraries/networking/src/NodeList.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 9b7a7c91dd..5e06ad2b5c 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -712,14 +712,18 @@ void NodeList::pingPunchForInactiveNode(const SharedNodePointer& node) { } void NodeList::startNodeHolePunch(const SharedNodePointer& node) { - // connect to the correct signal on this node so we know when to ping it - connect(node.data(), &Node::pingTimerTimeout, this, &NodeList::handleNodePingTimeout); - // start the ping timer for this node - node->startPingTimer(); + // we don't hole punch to replicants, since it is assumed that we have a direct line to them + if (node->getType() != NodeType::ReplicantAudioMixer && node->getType() != NodeType::ReplicantAvatarMixer) { + // connect to the correct signal on this node so we know when to ping it + connect(node.data(), &Node::pingTimerTimeout, this, &NodeList::handleNodePingTimeout); - // ping this node immediately - pingPunchForInactiveNode(node); + // start the ping timer for this node + node->startPingTimer(); + + // ping this node immediately + pingPunchForInactiveNode(node); + } } void NodeList::handleNodePingTimeout() { @@ -1121,4 +1125,4 @@ void NodeList::setRequestsDomainListData(bool isRequesting) { void NodeList::startThread() { moveToNewNamedThread(this, "NodeList Thread", QThread::TimeCriticalPriority); -} \ No newline at end of file +}