From 94d2fce1dd329863204a23db116b309dc71e7905 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 9 Jul 2015 11:52:57 -0700 Subject: [PATCH] Fix sendNackPackets logic --- .../src/octree/OctreeInboundPacketProcessor.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp b/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp index 174a592c2a..613eec18df 100644 --- a/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp +++ b/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp @@ -280,14 +280,15 @@ int OctreeInboundPacketProcessor::sendNackPackets() { ++it; } - packetsSent = nackPacketList.getNumPackets(); - if (packetsSent) { + if (nackPacketList.getNumPackets()) { qDebug() << "NACK Sent back to editor/client... destinationNode=" << nodeUUID; + + packetsSent += nackPacketList.getNumPackets(); + + // send the list of nack packets + nodeList->sendPacketList(nackPacketList, destinationNode); } - - // send the list of nack packets - nodeList->sendPacketList(nackPacketList, destinationNode); } return packetsSent;