From 1fe7718b9f720b48c13016134eec2f7e3689427b Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Tue, 11 Jul 2017 15:02:45 -0700 Subject: [PATCH] restore wasted byte count when unable to fit stats --- assignment-client/src/octree/OctreeSendThread.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assignment-client/src/octree/OctreeSendThread.cpp b/assignment-client/src/octree/OctreeSendThread.cpp index 46439b74df..868b377ced 100644 --- a/assignment-client/src/octree/OctreeSendThread.cpp +++ b/assignment-client/src/octree/OctreeSendThread.cpp @@ -232,9 +232,9 @@ int OctreeSendThread::handlePacketSend(SharedNodePointer node, OctreeQueryNode* numBytes = nodeData->getPacket().getDataSize(); _totalBytes += numBytes; _totalPackets++; - // since a stats message is only included on end of scene, don't consider any of these bytes "wasted" - // there was nothing else to send. - //_totalWastedBytes += 0; + // we count wasted bytes here because we were unable to fit the stats packet + thisWastedBytes = udt::MAX_PACKET_SIZE - numBytes; + _totalWastedBytes += thisWastedBytes; _trueBytesSent += numBytes; numPackets++;